Skip to content

Commit b5823d1

Browse files
committed
[testing] Enhancement: UDP barriers for more consistent testing
1 parent a9db96c commit b5823d1

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

tests/rust/udp.rs

+4-1
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,7 @@ mod test {
214214
anyhow::bail!("wait on push() failed")
215215
},
216216
}
217-
217+
alice_barrier.wait();
218218
// Pop data.
219219
let qt: QToken = match libos.pop(sockfd, None) {
220220
Ok(qt) => qt,
@@ -304,6 +304,7 @@ mod test {
304304
},
305305
}
306306

307+
bob_barrier.wait();
307308
// Close connection.
308309
match libos.async_close(sockfd) {
309310
Ok(qt) => {
@@ -375,6 +376,7 @@ mod test {
375376
},
376377
}
377378

379+
alice_barrier.wait();
378380
let qt: QToken = match libos.pop(sockfd, None) {
379381
Ok(qt) => qt,
380382
Err(e) => {
@@ -454,6 +456,7 @@ mod test {
454456
anyhow::bail!("push() failed")
455457
},
456458
}
459+
bob_barrier.wait();
457460

458461
// Close connection.
459462
match libos.async_close(sockfd) {

0 commit comments

Comments
 (0)