]> git.lizzy.rs Git - rust.git/commitdiff
Handle another possible error in a unix pipe test
authorAlex Crichton <alex@alexcrichton.com>
Mon, 28 Oct 2013 18:47:20 +0000 (11:47 -0700)
committerAlex Crichton <alex@alexcrichton.com>
Mon, 28 Oct 2013 18:47:20 +0000 (11:47 -0700)
This cropped up on the bsd bot, and if it's an error that gets thrown then it's
fine to just whitelist another type of error in the test.

src/libstd/rt/io/net/unix.rs

index e424956e2ff6323520cbf3533d5b0a132b30e73a..d9bdb73066d3bb22de7c74420a116d16c65d93a5 100644 (file)
@@ -243,7 +243,8 @@ fn write_begone() {
             let mut stop = false;
             while !stop{
                 do io_error::cond.trap(|e| {
-                    assert_eq!(e.kind, BrokenPipe);
+                    assert!(e.kind == BrokenPipe || e.kind == NotConnected,
+                            "unknown error {:?}", e);
                     stop = true;
                 }).inside {
                     server.write(buf);