mirror of
https://github.com/ziglang/zig.git
synced 2024-11-27 15:42:49 +00:00
remove wait timeout test cases
This commit is contained in:
parent
056b5a26c9
commit
ff445814cb
@ -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,
|
||||
|
Loading…
Reference in New Issue
Block a user