Skip to content

Commit 7c99d7a

Browse files
Mmap tests: refresh tempname to avoid windows fs slowness
1 parent e07451e commit 7c99d7a

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

stdlib/Mmap/test/runtests.jl

+2
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ close(s)
4747
@test_throws ErrorException mmap(file, Vector{Ref}) # must be bit-type
4848
GC.gc(); GC.gc()
4949

50+
file = tempname() # new name to reduce chance of issues due slow windows fs
5051
s = open(f->f,file,"w")
5152
@test mmap(file) == Vector{UInt8}() # requested len=0 on empty file
5253
@test mmap(file,Vector{UInt8},0) == Vector{UInt8}()
@@ -191,6 +192,7 @@ m = mmap(file,Vector{UInt8},2,6)
191192
@test_throws BoundsError m[3]
192193
finalize(m); m = nothing; GC.gc()
193194

195+
file = tempname() # new name to reduce chance of issues due slow windows fs
194196
s = open(file, "w")
195197
write(s, [0xffffffffffffffff,
196198
0xffffffffffffffff,

0 commit comments

Comments
 (0)