File tree Expand file tree Collapse file tree 1 file changed +22
-0
lines changed
Expand file tree Collapse file tree 1 file changed +22
-0
lines changed Original file line number Diff line number Diff line change @@ -571,4 +571,26 @@ pub mod test {
571571 QUIC_MAX_UNSTAKED_CONCURRENT_STREAMS
572572 ) ;
573573 }
574+
575+ #[ test]
576+ fn test_max_allowed_uni_streams_with_rtt ( ) {
577+ assert_eq ! (
578+ compute_max_allowed_uni_streams_with_rtt(
579+ REFERENCE_RTT_MS / 2 ,
580+ ConnectionPeerType :: Unstaked ,
581+ 10000
582+ ) ,
583+ QUIC_MAX_UNSTAKED_CONCURRENT_STREAMS ,
584+ "Max streams should not be less than normal for low RTT"
585+ ) ;
586+ assert_eq ! (
587+ compute_max_allowed_uni_streams_with_rtt(
588+ REFERENCE_RTT_MS + REFERENCE_RTT_MS / 2 ,
589+ ConnectionPeerType :: Unstaked ,
590+ 10000
591+ ) ,
592+ QUIC_MAX_UNSTAKED_CONCURRENT_STREAMS + QUIC_MAX_UNSTAKED_CONCURRENT_STREAMS / 2 ,
593+ "Max streams should scale with BDP in high-RTT connections"
594+ ) ;
595+ }
574596}
You can’t perform that action at this time.
0 commit comments