Skip to content

Commit

Permalink
sql: fix flake in TestTxnContentionEventsTable
Browse files Browse the repository at this point in the history
Instead of 499 ms, allow pg_sleep(.5) to sometimes take 490 ms.

Fixes: cockroachdb#118236

Release note: None
  • Loading branch information
michae2 committed Jan 26, 2024
1 parent 0fe4a72 commit 434094c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/sql/crdb_internal_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1019,7 +1019,7 @@ func causeContention(
ctx, fmt.Sprintf("UPDATE %s SET s = $1 where id = 'test';", table), updateValue)
require.NoError(t, errUpdate)
end := timeutil.Now()
require.GreaterOrEqual(t, end.Sub(start), 499*time.Millisecond)
require.GreaterOrEqual(t, end.Sub(start), 490*time.Millisecond)

wgTxnDone.Wait()
}
Expand Down

0 comments on commit 434094c

Please sign in to comment.