Skip to content
This repository has been archived by the owner on Nov 28, 2020. It is now read-only.

Make client test fail faster on race condition #46

Merged
merged 1 commit into from
May 28, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 9 additions & 8 deletions libzmq/src/auth/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -528,7 +528,7 @@ mod test {
let client =
ClientBuilder::new().connect(bound).with_ctx(&ctx).unwrap();

client.send("").unwrap();
client.try_send("").unwrap();
assert!(server.recv_msg().is_err());
}

Expand All @@ -552,7 +552,7 @@ mod test {
let client =
ClientBuilder::new().connect(bound).with_ctx(&ctx).unwrap();

client.send("").unwrap();
client.try_send("").unwrap();
server.recv_msg().unwrap();
}

Expand All @@ -569,7 +569,8 @@ mod test {
let client = Client::new().unwrap();

client.connect(bound).unwrap();
client.send("").unwrap();

client.try_send("").unwrap();
server.recv_msg().unwrap();
}

Expand All @@ -592,7 +593,7 @@ mod test {
client.set_mechanism(Mechanism::PlainClient(creds)).unwrap();
client.connect(bound).unwrap();

client.send("").unwrap();
client.try_send("").unwrap();
assert!(server.recv_msg().is_err());
}

Expand Down Expand Up @@ -623,7 +624,7 @@ mod test {
.with_ctx(&ctx)
.unwrap();

client.send("").unwrap();
client.try_send("").unwrap();
server.recv_msg().unwrap();
}

Expand Down Expand Up @@ -663,7 +664,7 @@ mod test {
.with_ctx(&ctx)
.unwrap();

client.send("").unwrap();
client.try_send("").unwrap();
server.recv_msg().unwrap();
}

Expand Down Expand Up @@ -691,7 +692,7 @@ mod test {
.build()
.unwrap();

client.send("").unwrap();
client.try_send("").unwrap();
assert!(server.recv_msg().is_err());
}

Expand Down Expand Up @@ -721,7 +722,7 @@ mod test {
client.set_mechanism(client_creds).unwrap();
client.connect(bound).unwrap();

client.send("").unwrap();
client.try_send("").unwrap();
server.recv_msg().unwrap();
}
}