Fix test to allow the directory watcher to start up.

This commit is contained in:
Sönke Ludwig 2019-06-01 21:44:20 +02:00
parent 731936ce9e
commit 2a6488a101

View file

@ -50,9 +50,14 @@ void main()
} }
}); });
auto fil = File(testDir~"/"~testFilename, "wt"); File fil;
auto tm = eventDriver.timers.create(); auto tm = eventDriver.timers.create();
eventDriver.timers.set(tm, 500.msecs, 0.msecs);
eventDriver.timers.wait(tm, (tm) {
try fil = File(testDir~"/"~testFilename, "wt");
catch (Exception e) assert(false, e.msg);
eventDriver.timers.set(tm, 1500.msecs, 0.msecs); eventDriver.timers.set(tm, 1500.msecs, 0.msecs);
eventDriver.timers.wait(tm, (tm) { eventDriver.timers.wait(tm, (tm) {
scope (failure) assert(false); scope (failure) assert(false);
@ -64,6 +69,7 @@ void main()
remove(testDir~"/"~testFilename); remove(testDir~"/"~testFilename);
}); });
}); });
});
ExitReason er; ExitReason er;
do er = eventDriver.core.processEvents(Duration.max); do er = eventDriver.core.processEvents(Duration.max);