-
Notifications
You must be signed in to change notification settings - Fork 125
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add initial RTT configurability #2041
base: main
Are you sure you want to change the base?
Changes from 3 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -53,6 +53,13 @@ fn test_idle_timeout(client: &mut Connection, server: &mut Connection, timeout: | |
assert!(matches!(client.state(), State::Closed(_))); | ||
} | ||
|
||
#[test] | ||
fn init_rtt_configuration() { | ||
const CUSTOM_INIT_RTT: Duration = Duration::from_millis(200); | ||
let client = new_client(ConnectionParameters::default().initial_rtt(CUSTOM_INIT_RTT)); | ||
assert_eq!(client.conn_params.get_initial_rtt(), CUSTOM_INIT_RTT); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is there a way to test whether the different initial RTT actually causes the desired behavior to happen? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Hmm, for that I guess I have to get more familiar with the main consumer of the configuration, I had a look at how this parameter is used inside the |
||
} | ||
|
||
#[test] | ||
fn idle_timeout() { | ||
let mut client = default_client(); | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Suggest to use a multiple of
INITIAL_RTT
instead of hardcoding a value. (We may changeINITIAL_RTT
at some point.)