Skip to content

Commit

Permalink
Merge #108484
Browse files Browse the repository at this point in the history
108484: roachtest: better failure message for c2c roachtests r=lidorcarmel a=lidorcarmel

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

Co-authored-by: Lidor Carmel <[email protected]>
  • Loading branch information
craig[bot] and lidorcarmel committed Aug 10, 2023
2 parents 74909fe + ca67d56 commit eff0185
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 eff0185

Please sign in to comment.