Skip to content

Commit

Permalink
roachtest: better failure message for c2c roachtests
Browse files Browse the repository at this point in the history
In some failures cases the c2c roachtests may try to cutover even though the
replication did not start successfully. This patch makes sure we fail with
a more clear error in those cases.

Epic: none
Fixes: #107935

Release note: None
  • Loading branch information
lidorcarmel committed Aug 9, 2023
1 parent a7f0434 commit ca67d56
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions pkg/cmd/roachtest/tests/cluster_to_cluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -749,6 +749,8 @@ func (rd *replicationDriver) main(ctx context.Context) {
rd.checkParticipatingNodes(ingestionJobID)

retainedTime := rd.getReplicationRetainedTime()
require.GreaterOrEqual(rd.t, cutoverTime, retainedTime,
"cannot cutover to a time below the retained time (did the test already fail?)")

rd.metrics.cutoverTo = newMetricSnapshot(metricSnapper, cutoverTime)
rd.metrics.cutoverStart = newMetricSnapshot(metricSnapper, timeutil.Now())
Expand Down

0 comments on commit ca67d56

Please sign in to comment.