diff options
author | Araq <rumpf_a@web.de> | 2018-09-15 12:21:01 +0200 |
---|---|---|
committer | Araq <rumpf_a@web.de> | 2018-09-15 12:21:01 +0200 |
commit | 4c347871071541d4e01f8d2c3a0593e84454219c (patch) | |
tree | f002e2527c3fed845526c51690d30d6b1b56ce33 /tests/async | |
parent | e4902a4a3518c7c27818a4004218ed341394df6e (diff) | |
download | Nim-4c347871071541d4e01f8d2c3a0593e84454219c.tar.gz |
make async test more reliable
Diffstat (limited to 'tests/async')
-rw-r--r-- | tests/async/tasyncfilewrite.nim | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/tests/async/tasyncfilewrite.nim b/tests/async/tasyncfilewrite.nim index cda612bae..8439778ca 100644 --- a/tests/async/tasyncfilewrite.nim +++ b/tests/async/tasyncfilewrite.nim @@ -6,12 +6,14 @@ string 3''' # bug #5532 import os, asyncfile, asyncdispatch -removeFile("test.txt") -let f = openAsync("test.txt", fmWrite) +const F = "test_async.txt" + +removeFile(F) +let f = openAsync(F, fmWrite) var futs = newSeq[Future[void]]() for i in 1..3: futs.add(f.write("string " & $i & "\n")) waitFor(all(futs)) f.close() -echo readFile("test.txt") +echo readFile(F) |