Skip to content

Commit

Permalink
test: check that no packets have been lost
Browse files Browse the repository at this point in the history
  • Loading branch information
dignifiedquire committed May 8, 2023
1 parent db5ad3e commit fd7e0fe
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/hp/magicsock/conn.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3303,6 +3303,10 @@ mod tests {
.await
.with_context(|| format!("[{}] finishing", b_name))?;

let stats = conn.stats();
println!("[{}] stats: {:#?}", a_name, stats);
assert_eq!(stats.path.lost_packets, 0, "[{}] should not loose any packets", b_name);

println!("[{}] close", b_name);
conn.close(0u32.into(), b"done");
println!("[{}] closed", b_name);
Expand Down Expand Up @@ -3351,6 +3355,10 @@ mod tests {
hex::encode(val)
);

let stats = conn.stats();
println!("[{}] stats: {:#?}", a_name, stats);
assert_eq!(stats.path.lost_packets, 0, "[{}] should not loose any packets", a_name);

println!("[{}] close", a_name);
conn.close(0u32.into(), b"done");
println!("[{}] wait idle", a_name);
Expand Down

0 comments on commit fd7e0fe

Please sign in to comment.