Skip to content

Commit

Permalink
streamingccl: deflake a few tests
Browse files Browse the repository at this point in the history
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
  • Loading branch information
msbutler committed May 14, 2024
1 parent 622c49c commit 1269197
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 1269197

Please sign in to comment.