summary refs log tree commit diff stats
path: root/tests/async
diff options
context:
space:
mode:
authorAraq <rumpf_a@web.de>2018-09-15 12:21:01 +0200
committerAraq <rumpf_a@web.de>2018-09-15 12:21:01 +0200
commit4c347871071541d4e01f8d2c3a0593e84454219c (patch)
treef002e2527c3fed845526c51690d30d6b1b56ce33 /tests/async
parente4902a4a3518c7c27818a4004218ed341394df6e (diff)
downloadNim-4c347871071541d4e01f8d2c3a0593e84454219c.tar.gz
make async test more reliable
Diffstat (limited to 'tests/async')
-rw-r--r--tests/async/tasyncfilewrite.nim8
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)