diff options
author | Jason Tedor <jason@tedor.me> | 2017-06-26 14:17:33 -0400 |
---|---|---|
committer | Jason Tedor <jason@tedor.me> | 2017-06-26 14:17:33 -0400 |
commit | 56d3a5e6d80318d7d687c1f722007e2f88242d79 (patch) | |
tree | ed86d2f124a93305d87e14958cbb7979844f6d24 /core/src/test/java/org/elasticsearch | |
parent | c6a03bc5497dda8aeffe36e56e8ce45c4ad09f73 (diff) |
Fix primary context sealing test
This commit updates some assertions in the primary context sealing test
after the restriction on updating allocation IDs from master and
updating global checkpoint on replica while sealed were removed.
Diffstat (limited to 'core/src/test/java/org/elasticsearch')
-rw-r--r-- | core/src/test/java/org/elasticsearch/index/seqno/GlobalCheckpointTrackerTests.java | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/core/src/test/java/org/elasticsearch/index/seqno/GlobalCheckpointTrackerTests.java b/core/src/test/java/org/elasticsearch/index/seqno/GlobalCheckpointTrackerTests.java index ae4aab107f..0eee4eb8a4 100644 --- a/core/src/test/java/org/elasticsearch/index/seqno/GlobalCheckpointTrackerTests.java +++ b/core/src/test/java/org/elasticsearch/index/seqno/GlobalCheckpointTrackerTests.java @@ -693,11 +693,11 @@ public class GlobalCheckpointTrackerTests extends ESTestCase { tracker.primaryContext(); assertTrue(tracker.sealed()); - // invoking any method that mutates the state of the tracker should fail + /* + * Invoking methods that mutates the state of the tracker should fail (with the exception of updating allocation IDs and updating + * global checkpoint on replica which can happen on the relocation source). + */ assertIllegalStateExceptionWhenSealed(() -> tracker.updateLocalCheckpoint(randomAlphaOfLength(16), randomNonNegativeLong())); - assertIllegalStateExceptionWhenSealed(() -> tracker.updateGlobalCheckpointOnReplica(randomNonNegativeLong())); - assertIllegalStateExceptionWhenSealed( - () -> tracker.updateAllocationIdsFromMaster(randomNonNegativeLong(), Collections.emptySet(), Collections.emptySet())); assertIllegalStateExceptionWhenSealed(() -> tracker.updateAllocationIdsFromPrimaryContext(mock(PrimaryContext.class))); assertIllegalStateExceptionWhenSealed(() -> tracker.primaryContext()); assertIllegalStateExceptionWhenSealed(() -> tracker.markAllocationIdAsInSync(randomAlphaOfLength(16), randomNonNegativeLong())); |