Skip to content

Commit 90ab4a6

Browse files
Stabilize RareClusterState (#38671) (#39468)
* Use actual master node, not just a master elligible node when trying to cancel publication. This only works on the master and for unlucky seeds we never try the master within the 10s that the busy assert runs. * Closes #36813
1 parent 2ce9457 commit 90ab4a6

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

server/src/test/java/org/elasticsearch/cluster/coordination/RareClusterStateIT.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,8 @@ public void onFailure(String source, Exception e) {
146146
private <Req extends ActionRequest, Res extends ActionResponse> ActionFuture<Res> executeAndCancelCommittedPublication(
147147
ActionRequestBuilder<Req, Res> req) throws Exception {
148148
ActionFuture<Res> future = req.execute();
149-
assertBusy(() -> assertTrue(((Coordinator)internalCluster().getMasterNodeInstance(Discovery.class)).cancelCommittedPublication()));
149+
assertBusy(
150+
() -> assertTrue(((Coordinator)internalCluster().getCurrentMasterNodeInstance(Discovery.class)).cancelCommittedPublication()));
150151
return future;
151152
}
152153

@@ -276,7 +277,6 @@ public void testDelayedMappingPropagationOnPrimary() throws Exception {
276277
});
277278
}
278279

279-
@AwaitsFix(bugUrl="https://github.com/elastic/elasticsearch/issues/36813")
280280
public void testDelayedMappingPropagationOnReplica() throws Exception {
281281
// This is essentially the same thing as testDelayedMappingPropagationOnPrimary
282282
// but for replicas

0 commit comments

Comments
 (0)