Skip to content

Commit

Permalink
Add test comments for compliance check.
Browse files Browse the repository at this point in the history
  • Loading branch information
Ruben2424 authored and seanmonstar committed Aug 30, 2024
1 parent 1af2235 commit c5ce90d
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions h3/src/tests/connection.rs
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,12 @@ async fn client_close_only_on_last_sender_drop() {

#[tokio::test]
async fn settings_exchange_client() {
//= https://www.rfc-editor.org/rfc/rfc9114#section-3.2
//= type=test
//# After the QUIC connection is
//# established, a SETTINGS frame MUST be sent by each endpoint as the
//# initial frame of their respective HTTP control stream.

init_tracing();
let mut pair = Pair::default();
let mut server = pair.server();
Expand Down Expand Up @@ -230,6 +236,12 @@ async fn settings_exchange_client() {

#[tokio::test]
async fn settings_exchange_server() {
//= https://www.rfc-editor.org/rfc/rfc9114#section-3.2
//= type=test
//# After the QUIC connection is
//# established, a SETTINGS frame MUST be sent by each endpoint as the
//# initial frame of their respective HTTP control stream.

init_tracing();
let mut pair = Pair::default();
let mut server = pair.server();
Expand All @@ -244,7 +256,7 @@ async fn settings_exchange_server() {
future::poll_fn(|cx| conn.poll_close(cx)).await.unwrap();
};

tokio::select! { _ = drive => () };
drive.await;
};

let server_fut = async {
Expand All @@ -271,7 +283,7 @@ async fn settings_exchange_server() {
tokio::select! { _ = accept => panic!("server resolved first"), _ = settings_change => () };
};

tokio::select! { _ = server_fut => (), _ = client_fut => () };
tokio::join!(server_fut, client_fut);
}

#[tokio::test]
Expand Down

0 comments on commit c5ce90d

Please sign in to comment.