Skip to content

Commit f552c5c

Browse files
leodidoona-agent
andcommitted
test(s3): reduce flaky threshold for batch optimization test
Lower the speedup threshold from 1.0 to 0.75 for small package counts (< 50). With small package counts, batch overhead can occasionally make it slower than sequential, causing flaky test failures. Co-authored-by: Ona <[email protected]>
1 parent aa9a7a5 commit f552c5c

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

pkg/leeway/cache/remote/s3_performance_test.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -476,7 +476,9 @@ func TestS3Cache_ExistingPackagesBatchOptimization(t *testing.T) {
476476
if count >= 50 {
477477
require.Greater(t, speedup, 2.5, "Batch optimization should be at least 2.5x faster for 50+ packages")
478478
} else {
479-
require.Greater(t, speedup, 1.0, "Batch optimization should be faster than sequential")
479+
// For small package counts, batch overhead may reduce speedup
480+
// Use a lower threshold to avoid flaky tests
481+
require.Greater(t, speedup, 0.75, "Batch optimization should not be significantly slower than sequential")
480482
}
481483
})
482484
}

0 commit comments

Comments
 (0)