Skip to content

Commit b36b5d2

Browse files
committed
Increase race detector threshold for 1000 values to 50s
CI runners on Go 1.17.x with race detector were taking 44-45s, exceeding the 35s threshold. Increased to 50s to account for slow/loaded CI runners while still catching performance regressions. Also added debug logging to show which thresholds are active.
1 parent 84d7ca4 commit b36b5d2

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

decoder_test.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1964,16 +1964,18 @@ func TestIssue71NestedPerformance(t *testing.T) {
19641964

19651965
if raceEnabled {
19661966
// Lenient thresholds for race detector mode (CI)
1967+
t.Log("Using lenient thresholds (race detector enabled)")
19671968
thresholds = []struct {
19681969
numValues int
19691970
maxTime time.Duration
19701971
}{
19711972
{10, 50 * time.Millisecond},
19721973
{100, 500 * time.Millisecond},
1973-
{1000, 35 * time.Second},
1974+
{1000, 50 * time.Second}, // Extra lenient for slow CI runners
19741975
}
19751976
} else {
19761977
// Strict thresholds for normal mode (local dev)
1978+
t.Log("Using strict thresholds (race detector disabled)")
19771979
thresholds = []struct {
19781980
numValues int
19791981
maxTime time.Duration

0 commit comments

Comments
 (0)