Adjust USDS test for macOS behavior.

This commit is contained in:
Sönke Ludwig 2017-01-23 22:18:46 +01:00
parent 356a34fad2
commit 4f94cd107e

View file

@ -55,6 +55,9 @@ void testDgram()
assert(bytes == pack2.length);
})(pack2, IOMode.once, baddr);
auto tm = eventDriver.timers.create();
eventDriver.timers.set(tm, 50.msecs, 0.msecs);
eventDriver.timers.wait(tm, (tm) {
s_baseSocket.receive!((status, bts, scope addr) {
assert(status == IOStatus.ok);
assert(bts == pack2.length);
@ -68,6 +71,7 @@ void testDgram()
// FIXME: this shouldn't ne necessary:
eventDriver.core.exit();
})(s_rbuf, IOMode.immediate);
});
})(s_rbuf, IOMode.once);
s_connectedSocket.send!((status, bytes) {
assert(status == IOStatus.ok);