Skip to content

Commit

Permalink
fix test reason assertion.
Browse files Browse the repository at this point in the history
Signed-off-by: Marc Handalian <[email protected]>
  • Loading branch information
mch2 committed Jan 29, 2024
1 parent 44b6e75 commit 094139d
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -620,6 +620,7 @@ public void testForceSegmentSyncHandlerWithFailure_AlreadyClosedException_swallo
}

public void testTargetCancelledBeforeStartInvoked() {
final String cancelReason = "test";
final SegmentReplicationTarget target = new SegmentReplicationTarget(
replicaShard,
primaryShard.getLatestReplicationCheckpoint(),
Expand All @@ -634,11 +635,11 @@ public void onReplicationDone(SegmentReplicationState state) {
public void onReplicationFailure(SegmentReplicationState state, ReplicationFailedException e, boolean sendShardFailure) {
// failures leave state object in last entered stage.
assertEquals(SegmentReplicationState.Stage.INIT, state.getStage());
assertEquals("Cancelled by local shutdown", e.getMessage());
assertEquals(cancelReason, e.getMessage());
}
}
);
target.cancel("test");
target.cancel(cancelReason);
sut.startReplication(target);
}

Expand Down

0 comments on commit 094139d

Please sign in to comment.