Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion tests/integration/harness/asserts.go
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,17 @@ func Eventually(t *testing.T, timeout time.Duration, predicate func() bool, msg
// positive-convergence asserts — it returns the moment the predicate
// passes — so green runs pay nothing for the stretch; only genuinely
// failing runs report slower, still capped by the job-level -timeout.
//
// ×3 (90s) still wasn't enough headroom for the heaviest autoplace-
// convergence cases under full-suite CI contention: GroupFR's
// ToggleDiskful2DisklessReapsTieBreaker and GroupJ's
// CSICreateVolumeFromEmpty both timed out at exactly 90s on a loaded
// runner while completing in ~8s locally — starvation, not a hang. The
// scale is ×5 (150s) to give the placer/mock-satellite reconcile loop
// more wall-clock under contention. A genuinely stuck test still fails
// the job at the -timeout=15m ceiling, and green runs still pay nothing.
func scaledTimeout(timeout time.Duration) time.Duration {
const ciScale = 3
const ciScale = 5

if os.Getenv("CI") == "" {
return timeout
Expand Down
9 changes: 6 additions & 3 deletions tests/integration/harness/asserts_ci_scale_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,15 @@ import (
// TestScaledTimeoutStretchesOnCI pins the CI budget stretch: the
// per-group convergence constants are tuned for dev machines, and the
// Integration lane rotate-flaked on GitHub runners until Eventually
// budgets were scaled there (GroupI / GroupJ 30s timeouts).
// budgets were scaled there (GroupI / GroupJ 30s timeouts). The scale
// is ×5 (30s → 150s): ×3 (90s) still rotate-flaked the heaviest
// autoplace-convergence cases (GroupFR / GroupJ) under full-suite
// contention while they complete in ~8s locally.
func TestScaledTimeoutStretchesOnCI(t *testing.T) {
t.Setenv("CI", "true")

if got := scaledTimeout(30 * time.Second); got != 90*time.Second {
t.Fatalf("scaledTimeout on CI: got %s, want 90s", got)
if got := scaledTimeout(30 * time.Second); got != 150*time.Second {
t.Fatalf("scaledTimeout on CI: got %s, want 150s", got)
}

t.Setenv("CI", "")
Expand Down