Flkay quic test in check_block_multiple_connections (#31871)

Flkay quic test -- put the test code in else condition
This commit is contained in:
Lijun Wang 2023-05-30 12:43:07 -07:00 committed by GitHub
parent 8203c6e85a
commit 0426a2d96e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 14 additions and 14 deletions

View File

@ -1241,21 +1241,21 @@ pub mod test {
// the stream -- expect it.
let s2 = s2.err().unwrap();
assert!(matches!(s2, quinn::ConnectionError::ApplicationClosed(_)));
return;
} else {
let mut s2 = s2.unwrap();
s1.write_all(&[0u8]).await.unwrap();
s1.finish().await.unwrap();
// Send enough data to create more than 1 chunks.
// The first will try to open the connection (which should fail).
// The following chunks will enable the detection of connection failure.
let data = vec![1u8; PACKET_DATA_SIZE * 2];
s2.write_all(&data)
.await
.expect_err("shouldn't be able to open 2 connections");
s2.finish()
.await
.expect_err("shouldn't be able to open 2 connections");
}
let mut s2 = s2.unwrap();
s1.write_all(&[0u8]).await.unwrap();
s1.finish().await.unwrap();
// Send enough data to create more than 1 chunks.
// The first will try to open the connection (which should fail).
// The following chunks will enable the detection of connection failure.
let data = vec![1u8; PACKET_DATA_SIZE * 2];
s2.write_all(&data)
.await
.expect_err("shouldn't be able to open 2 connections");
s2.finish()
.await
.expect_err("shouldn't be able to open 2 connections");
}
pub async fn check_multiple_streams(