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.
This commit is contained in:
Jason Tedor 2017-06-26 14:17:33 -04:00
parent c6a03bc549
commit 56d3a5e6d8
1 changed files with 4 additions and 4 deletions

View File

@ -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()));