about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorAlex Crichton <alex@alexcrichton.com>2015-02-23 09:53:03 -0800
committerAlex Crichton <alex@alexcrichton.com>2015-02-23 09:53:03 -0800
commit2408436eb420ea79f4f4ceaa3b72cf3ebdee47ad (patch)
tree16f20cb56ce9ce2d05eac24a1bb916620937204d /src
parentf0f7ca27de6b4e03f30012656dad270cda55a363 (diff)
downloadrust-2408436eb420ea79f4f4ceaa3b72cf3ebdee47ad.tar.gz
rust-2408436eb420ea79f4f4ceaa3b72cf3ebdee47ad.zip
test: Make two tests less flaky on windows
If these tests exit while a thread is panicking it often leads to situations
like #22628.
Diffstat (limited to 'src')
-rw-r--r--src/test/run-pass/unwind-resource.rs3
-rw-r--r--src/test/run-pass/unwind-unique.rs3
2 files changed, 4 insertions, 2 deletions
diff --git a/src/test/run-pass/unwind-resource.rs b/src/test/run-pass/unwind-resource.rs
index 52c09aadfbd..449e500edbe 100644
--- a/src/test/run-pass/unwind-resource.rs
+++ b/src/test/run-pass/unwind-resource.rs
@@ -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());
 }
diff --git a/src/test/run-pass/unwind-unique.rs b/src/test/run-pass/unwind-unique.rs
index d38b6e79eba..4d90f71c830 100644
--- a/src/test/run-pass/unwind-unique.rs
+++ b/src/test/run-pass/unwind-unique.rs
@@ -19,5 +19,6 @@ fn f() {
 }
 
 pub fn main() {
-    let _t = thread::spawn(f);
+    let t = thread::spawn(f);
+    drop(t.join());
 }