Skip to content

Commit 7e6a89e

Browse files
author
Matt Whelan
committed
server: fixes test flaps due to drains timing out
Use the SucceedSoonDuration rather than a static 30s timeout. This is responsive to various test parameters. Fixes: #149515 Release note: None
1 parent 8f667c4 commit 7e6a89e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pkg/server/api_v2_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -535,7 +535,7 @@ func TestCheckRestartSafe_Integration(t *testing.T) {
535535
}
536536

537537
func drain(ctx context.Context, ts1 serverutils.TestServerInterface, t *testing.T) error {
538-
timeoutCtx, cancel := context.WithTimeout(ctx, 30*time.Second)
538+
timeoutCtx, cancel := context.WithTimeout(ctx, testutils.SucceedsSoonDuration())
539539
defer cancel()
540540

541541
err := ts1.DrainClients(ctx)

0 commit comments

Comments
 (0)