Skip to content

Commit

Permalink
Adds extra test
Browse files Browse the repository at this point in the history
  • Loading branch information
maddeleine committed Mar 4, 2025
1 parent a8d3ee4 commit 637b296
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
11 changes: 11 additions & 0 deletions quic/s2n-quic-core/src/connection/limits.rs
Original file line number Diff line number Diff line change
Expand Up @@ -481,4 +481,15 @@ mod tests {
assert!(limits.with_bidirectional_remote_data_window(data).is_ok());
assert!(limits.with_unidirectional_data_window(data).is_ok());
}

// Limits can be updated through the UpdatableLimits wrapper
#[test]
fn updatable_limits() {
let mut limits = Limits::default();
assert_eq!(limits.stream_batch_size, 1);
let mut updatable_limits = UpdatableLimits::new(&mut limits);
let new_size = 10;
updatable_limits.stream_batch_size(new_size);
assert_eq!(limits.stream_batch_size, new_size);
}
}
2 changes: 1 addition & 1 deletion quic/s2n-quic/src/tests/connection_limits.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ fn connection_limits() {
assert_eq!(info.remote_address.port(), port);
assert_eq!(*info.server_name.unwrap(), "localhost".into());
assert_eq!(info.application_protocol, "h3");
limits.stream_batch_size(100);
limits.stream_batch_size(10);
}
}

Expand Down

0 comments on commit 637b296

Please sign in to comment.