Skip to content

Commit

Permalink
Rewrite test for #1726 to be more robust w.r.t. timing. Fixes #1734.
Browse files Browse the repository at this point in the history
  • Loading branch information
s-ludwig committed Apr 7, 2017
1 parent 1084d45 commit 4a2c484
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions tests/vibe.core.net.1726/source/app.d
Original file line number Diff line number Diff line change
Expand Up @@ -36,18 +36,17 @@ shared static this()
wt.join();
assert(read_ex, "No read exception thrown");
assert(write_ex, "No write exception thrown");
done = true;
exitEventLoop();
});


runTask({
try {
auto conn = connectTCP("127.0.0.1", 11375);
conn.close();
} catch (Exception e) assert(false, e.msg);
sleep(50.msecs);
assert(done, "Not done");
});

exitEventLoop();
setTimer(1000.msecs, {
assert(false, "Test has hung.");
});
}

0 comments on commit 4a2c484

Please sign in to comment.