Skip to content

Commit

Permalink
test: Make two tests less flaky on windows
Browse files Browse the repository at this point in the history
If these tests exit while a thread is panicking it often leads to situations
like rust-lang#22628.
  • Loading branch information
alexcrichton committed Feb 23, 2015
1 parent f0f7ca2 commit 2408436
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/test/run-pass/unwind-resource.rs
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,8 @@ fn f(tx: Sender<bool>) {

pub fn main() {
let (tx, rx) = channel();
let _t = thread::spawn(move|| f(tx.clone()));
let t = thread::spawn(move|| f(tx.clone()));
println!("hiiiiiiiii");
assert!(rx.recv().unwrap());
drop(t.join());
}
3 changes: 2 additions & 1 deletion src/test/run-pass/unwind-unique.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,6 @@ fn f() {
}

pub fn main() {
let _t = thread::spawn(f);
let t = thread::spawn(f);
drop(t.join());
}

0 comments on commit 2408436

Please sign in to comment.