chore(config, connections): use same reconnection interval for QUIC and TCP (fixes #10507) (#10573)

Signed-off-by: Marcus B Spencer <marcus@marcusspencer.us>
This commit is contained in:
Marcus B Spencer
2026-02-12 10:41:30 +01:00
committed by GitHub
parent dc2a77ab8e
commit 75dd940128
7 changed files with 33 additions and 12 deletions
+22
View File
@@ -34,3 +34,25 @@ func TestMigrateCrashReporting(t *testing.T) {
}
}
}
func TestMigrateReconnectInterval(t *testing.T) {
cases := []struct {
oldInterval int
expectedNewInterval int
}{
{oldInterval: 60, expectedNewInterval: 20},
{oldInterval: 120, expectedNewInterval: 40},
{oldInterval: 25, expectedNewInterval: 10},
{oldInterval: 5, expectedNewInterval: 5},
}
for i, tc := range cases {
cfg := Configuration{Version: 51, Options: OptionsConfiguration{ReconnectIntervalS: tc.oldInterval}}
migrationsMut.Lock()
migrations.apply(&cfg)
migrationsMut.Unlock()
if cfg.Options.ReconnectIntervalS != tc.expectedNewInterval {
t.Errorf("%d: unexpected result, ReconnectIntervalS: %v != %v", i, cfg.Options.ReconnectIntervalS, tc.expectedNewInterval)
}
}
}