Skip to content

Commit

Permalink
Do not use mock engine in PrimaryAllocationIT (#44083)
Browse files Browse the repository at this point in the history
PrimaryAllocationIT#testForceStaleReplicaToBePromotedToPrimary 
relies on the flushing when a shard is no long assigned. This behavior,
however, can be randomly disabled in MockInternalEngine.

Closes #44049
  • Loading branch information
dnhatn committed Jul 9, 2019
1 parent 071b652 commit dbe8d64
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,12 @@ protected Collection<Class<? extends Plugin>> nodePlugins() {
return Arrays.asList(MockTransportService.TestPlugin.class, InternalSettingsPlugin.class);
}

@Override
protected boolean addMockInternalEngine() {
// testForceStaleReplicaToBePromotedToPrimary replies on the flushing when a shard is no longer assigned.
return false;
}

public void testBulkWeirdScenario() throws Exception {
String master = internalCluster().startMasterOnlyNode(Settings.EMPTY);
internalCluster().startDataOnlyNodes(2);
Expand Down Expand Up @@ -222,7 +228,6 @@ public void testFailedAllocationOfStalePrimaryToDataNodeWithNoData() throws Exce
.getShards().get(0).primaryShard().unassignedInfo().getReason(), equalTo(UnassignedInfo.Reason.NODE_LEFT));
}

@AwaitsFix(bugUrl = "https://github.com/elastic/elasticsearch/issues/44049")
public void testForceStaleReplicaToBePromotedToPrimary() throws Exception {
logger.info("--> starting 3 nodes, 1 master, 2 data");
String master = internalCluster().startMasterOnlyNode(Settings.EMPTY);
Expand Down

0 comments on commit dbe8d64

Please sign in to comment.