From dbe8d6478c0c1cad154706fb4dd5ab66a53f434d Mon Sep 17 00:00:00 2001 From: Nhat Nguyen Date: Tue, 9 Jul 2019 09:51:56 -0400 Subject: [PATCH] Do not use mock engine in PrimaryAllocationIT (#44083) PrimaryAllocationIT#testForceStaleReplicaToBePromotedToPrimary relies on the flushing when a shard is no long assigned. This behavior, however, can be randomly disabled in MockInternalEngine. Closes #44049 --- .../elasticsearch/cluster/routing/PrimaryAllocationIT.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/server/src/test/java/org/elasticsearch/cluster/routing/PrimaryAllocationIT.java b/server/src/test/java/org/elasticsearch/cluster/routing/PrimaryAllocationIT.java index 35b58d027e3ab..e7291d4413311 100644 --- a/server/src/test/java/org/elasticsearch/cluster/routing/PrimaryAllocationIT.java +++ b/server/src/test/java/org/elasticsearch/cluster/routing/PrimaryAllocationIT.java @@ -90,6 +90,12 @@ protected Collection> 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); @@ -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);