test: Make two tests less flaky on windows

If these tests exit while a thread is panicking it often leads to situations
like #22628.
This commit is contained in:
Alex Crichton 2015-02-23 09:53:03 -08:00
parent f0f7ca27de
commit 2408436eb4
2 changed files with 4 additions and 2 deletions

View File

@ -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());
}

View File

@ -19,5 +19,6 @@ fn f() {
}
pub fn main() {
let _t = thread::spawn(f);
let t = thread::spawn(f);
drop(t.join());
}