Skip to content

Commit ca2a17b

Browse files
committed
changefeedccl: make TestChangefeedJobUpdateFailsIfNotClaimed less flaky
Recent changes to make changefeed.resolved_timestamp.granularity metamorphic has made tests more flaky due to causing more timeouts. TestChangefeedJobUpdateFailsIfNotClaimed was especially flaky, but its timeout is improved by accounting for changefeed.resolved_timestamp.granularity. Epic: none Fixes: #144912 Release note: none
1 parent 293dcb9 commit ca2a17b

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

pkg/ccl/changefeedccl/changefeed_test.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6132,8 +6132,6 @@ func TestChangefeedJobUpdateFailsIfNotClaimed(t *testing.T) {
61326132
defer leaktest.AfterTest(t)()
61336133
defer log.Scope(t).Close(t)
61346134

6135-
skip.WithIssue(t, 144912)
6136-
61376135
// Set TestingKnobs to return a known session for easier
61386136
// comparison.
61396137
adoptionInterval := 20 * time.Minute
@@ -6175,9 +6173,11 @@ func TestChangefeedJobUpdateFailsIfNotClaimed(t *testing.T) {
61756173
// another node.
61766174
sqlDB.Exec(t, `UPDATE system.jobs SET claim_session_id = NULL WHERE id = $1`, jobID)
61776175

6178-
timeout := 5 * time.Second
6176+
timeout := (5 * time.Second) + changefeedbase.Quantize.Get(&s.Server.ClusterSettings().SV)
6177+
61796178
if util.RaceEnabled {
6180-
timeout = 30 * time.Second
6179+
// Timeout should be at least 30s to allow for race conditions.
6180+
timeout += 25 * time.Second
61816181
}
61826182
// Expect that the distflow fails since it can't
61836183
// update the checkpoint.

0 commit comments

Comments
 (0)