diff options
| author | bors <bors@rust-lang.org> | 2015-01-21 05:55:02 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2015-01-21 05:55:02 +0000 |
| commit | 51e28dd0c88030b8661f0c414eb0af3e09840b31 (patch) | |
| tree | 65de19980fc03c5d0a22495ece95bf04b507380e /src/libstd | |
| parent | 710dcdc2ebf7adfa95bde406c75795a16fdde30b (diff) | |
| parent | 2854f0c75e40361a27f200a80612a8a357335843 (diff) | |
| download | rust-51e28dd0c88030b8661f0c414eb0af3e09840b31.tar.gz rust-51e28dd0c88030b8661f0c414eb0af3e09840b31.zip | |
Auto merge of #21395 - sfackler:fix-cvar-test, r=alexcrichton
r? @alexcrichton
Diffstat (limited to 'src/libstd')
| -rw-r--r-- | src/libstd/sync/condvar.rs | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/libstd/sync/condvar.rs b/src/libstd/sync/condvar.rs index a81a4504323..d2d5335078e 100644 --- a/src/libstd/sync/condvar.rs +++ b/src/libstd/sync/condvar.rs @@ -420,14 +420,15 @@ mod tests { static M: StaticMutex = MUTEX_INIT; let g = M.lock().unwrap(); - let (g, success) = C.wait_timeout(g, Duration::nanoseconds(1000)).unwrap(); - assert!(!success); + let (g, _no_timeout) = C.wait_timeout(g, Duration::nanoseconds(1000)).unwrap(); + // spurious wakeups mean this isn't necessarily true + // assert!(!no_timeout); let _t = Thread::spawn(move || { let _g = M.lock().unwrap(); C.notify_one(); }); - let (g, success) = C.wait_timeout(g, Duration::days(1)).unwrap(); - assert!(success); + let (g, no_timeout) = C.wait_timeout(g, Duration::days(1)).unwrap(); + assert!(no_timeout); drop(g); unsafe { C.destroy(); M.destroy(); } } |
