Skip to content

Commit 9dae4cf

Browse files
committed
Fix private::exclusive_unwrap_conflict test. Fixes #4689.
1 parent e0767bf commit 9dae4cf

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/libcore/private.rs

+3-2
Original file line numberDiff line numberDiff line change
@@ -493,7 +493,7 @@ pub mod tests {
493493
res.recv();
494494
}
495495
496-
#[test] #[should_fail] #[ignore(reason = "random red")]
496+
#[test] #[should_fail] #[ignore(cfg(windows))]
497497
pub fn exclusive_unwrap_conflict() {
498498
let x = exclusive(~~"hello");
499499
let x2 = ~mut Some(x.clone());
@@ -505,7 +505,8 @@ pub mod tests {
505505
}
506506
assert unwrap_exclusive(x) == ~~"hello";
507507
let res = option::swap_unwrap(&mut res);
508-
res.recv();
508+
// See #4689 for why this can't be just "res.recv()".
509+
assert res.recv() == task::Success;
509510
}
510511
511512
#[test] #[ignore(cfg(windows))]

0 commit comments

Comments
 (0)