Skip to content

Commit

Permalink
sql: fix insight integration test for contention
Browse files Browse the repository at this point in the history
This change lowers the latency threshold for which
statement is considered slow to make sure it detects
contention.
Previous value was set to 100ms which is default. New
value is set to 30ms to be the same as overridden
value in other tests.

Release note: None
  • Loading branch information
koorosh committed Aug 4, 2023
1 parent a17f8e8 commit 5230230
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/sql/sqlstats/insights/integration/insights_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -523,7 +523,7 @@ func TestInsightsIntegrationForContention(t *testing.T) {
require.NoError(t, err)

// Enable detection by setting a latencyThreshold > 0.
latencyThreshold := 100 * time.Millisecond
latencyThreshold := 30 * time.Millisecond
insights.LatencyThreshold.Override(ctx, &settings.SV, latencyThreshold)

// Create a new connection, and then in a go routine have it start a transaction, update a row,
Expand Down

0 comments on commit 5230230

Please sign in to comment.