Skip to content

Commit b8a8c58

Browse files
committed
Connection tests are now cumulative.
'normal' does everything 'cursory' does and adds more 'soak' does everything 'normal' does and adds more
1 parent 6ed2ae6 commit b8a8c58

1 file changed

Lines changed: 6 additions & 5 deletions

File tree

tests/test_connection.cpp

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ enum class ETestConnectionMode
2525
{
2626
Cursory, // Very fast sanity check: 1 condition, short durations
2727
Normal, // Standard: 2 conditions, moderate durations
28-
Soak, // Exhaustive: all conditions, long durations
28+
Soak, // Exhaustive: cumulative superset of Normal; all conditions, long durations
2929
};
3030

3131
static std::default_random_engine g_rand;
@@ -528,21 +528,22 @@ static void Test_Connection( ETestConnectionMode eMode, const SteamNetworkingIPA
528528
TestNetworkConditions( rate, loss, lag, reorderPct, reorderLag, true, eMode );
529529
};
530530

531-
if ( eMode == ETestConnectionMode::Cursory )
531+
// ETestConnectionMode::Cursory )
532532
{
533533
Test( 128000, 10, 50, 2, 50 ); // Low bandwidth, high packet loss
534534
}
535-
else if ( eMode == ETestConnectionMode::Normal )
535+
536+
if ( eMode >= ETestConnectionMode::Normal )
536537
{
537-
Test( 128000, 10, 50, 2, 50 ); // Low bandwidth, high packet loss
538538
Test( 1000000, 5, 10, 1, 10 ); // Medium bandwidth, still pretty bad packet loss
539539

540540
// Zero loss so acks flow freely (stop_waiting tracks within one RTT of
541541
// current packet number). Heavy reorder builds reliable stream fragments
542542
// without the retransmission backlog that keeps stop_waiting far behind.
543543
TestNetworkConditions( 2000000, 0, 50, 30, 40, false, eMode );
544544
}
545-
else
545+
546+
if ( eMode >= ETestConnectionMode::Soak )
546547
{
547548
Test( 64000, 20, 100, 4, 50 ); // low bandwidth, terrible packet loss
548549
Test( 1000000, 20, 100, 4, 10 ); // high bandwidth, terrible packet loss

0 commit comments

Comments
 (0)