Skip to content

Commit a5fcca3

Browse files
committed
Fix for intermittent Windows failures, see rust-lang#22628
1 parent 2b01a37 commit a5fcca3

File tree

2 files changed

+24
-0
lines changed

2 files changed

+24
-0
lines changed

src/test/run-pass/unwind-resource.rs

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,4 +40,16 @@ pub fn main() {
4040
let _t = thread::spawn(move|| f(tx.clone()));
4141
println!("hiiiiiiiii");
4242
assert!(rx.recv().unwrap());
43+
44+
#[cfg(windows)]
45+
{
46+
// Quick fix for an intermittent failure
47+
// We don't want to exit the test till we know that the
48+
// child has finished unwinding, because Windows blocks the
49+
// test libraries till the thread exits
50+
// FIXME #22628
51+
use std::old_io::timer::sleep;
52+
use std::time::duration::Duration;
53+
sleep(Duration::seconds(20));
54+
}
4355
}

src/test/run-pass/unwind-unique.rs

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,4 +20,16 @@ fn f() {
2020

2121
pub fn main() {
2222
let _t = thread::spawn(f);
23+
24+
#[cfg(windows)]
25+
{
26+
// Quick fix for an intermittent failure
27+
// We don't want to exit the test till we know that the
28+
// child has finished unwinding, because Windows blocks the
29+
// test libraries till the thread exits
30+
// FIXME #22628
31+
use std::old_io::timer::sleep;
32+
use std::time::duration::Duration;
33+
sleep(Duration::seconds(20));
34+
}
2335
}

0 commit comments

Comments
 (0)