Skip to content

Commit

Permalink
Merge #124162
Browse files Browse the repository at this point in the history
124162: streamingccl: deflake a few tests r=msbutler a=msbutler

As of #123934, the producer job succeeds instead of fails. This patch teaches some test infra about this.

Fixes #124139
Fixes #124138
Fixes #124151
Fixes #124137

Release note: none

Co-authored-by: Michael Butler <butler@cockroachlabs.com>
  • Loading branch information
craig[bot] and msbutler committed May 14, 2024
2 parents 7c6feb0 + 1269197 commit 7641e6e
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions pkg/ccl/streamingccl/replicationtestutils/testutils.go
Original file line number Diff line number Diff line change
Expand Up @@ -252,13 +252,7 @@ ORDER BY created DESC LIMIT 1`, c.Args.DestTenantName)
// Grab the latest producer job on the destination cluster.
var status string
c.DestSysSQL.QueryRow(c.T, "SELECT status FROM system.jobs WHERE id = $1", retentionJobID).Scan(&status)
if jobs.Status(status) == jobs.StatusRunning {
return nil
}
if jobs.Status(status) == jobs.StatusFailed {
payload := jobutils.GetJobPayload(c.T, c.DestSysSQL, retentionJobID)
require.Contains(c.T, payload.Error, "replication stream")
require.Contains(c.T, payload.Error, "timed out")
if jobs.Status(status) == jobs.StatusRunning || jobs.Status(status) == jobs.StatusSucceeded {
return nil
}
return errors.Newf("Unexpected status %s", status)
Expand Down

0 comments on commit 7641e6e

Please sign in to comment.