diff options
| author | Alex Crichton <alex@alexcrichton.com> | 2015-02-23 09:53:03 -0800 |
|---|---|---|
| committer | Alex Crichton <alex@alexcrichton.com> | 2015-02-23 09:53:03 -0800 |
| commit | 2408436eb420ea79f4f4ceaa3b72cf3ebdee47ad (patch) | |
| tree | 16f20cb56ce9ce2d05eac24a1bb916620937204d /src | |
| parent | f0f7ca27de6b4e03f30012656dad270cda55a363 (diff) | |
| download | rust-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.rs | 3 | ||||
| -rw-r--r-- | src/test/run-pass/unwind-unique.rs | 3 |
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()); } |
