remove wait timeout test cases

This commit is contained in:
kprotty 2019-11-26 13:04:18 -06:00 committed by Andrew Kelley
parent 056b5a26c9
commit ff445814cb
No known key found for this signature in database
GPG Key ID: 7C5F548F728501A9

View File

@ -389,16 +389,6 @@ test "std.ResetEvent" {
testing.expect(event.isSet() == false);
testing.expect(event.reset() == false);
// test waiting timeout
const delay = 100 * time.millisecond;
const error_margin = 50 * time.millisecond;
var timer = time.Timer.start() catch unreachable;
testing.expectError(ResetEvent.WaitError.TimedOut, event.wait(delay));
const elapsed = timer.read();
testing.expect(elapsed >= delay - error_margin);
testing.expect(elapsed <= delay + error_margin);
// test cross thread signaling
const Context = struct {
event: ResetEvent,