Skip to content

Commit 69e2aef

Browse files
dnhatnkcm
authored andcommitted
TEST: Add engine is closed as expected failure msg
This commit adds "engine is closed" as an expected failure message. This change is due to #33967 in which we might access a closed engine on promotion. Relates #33967
1 parent 9ab84a0 commit 69e2aef

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

server/src/test/java/org/elasticsearch/index/replication/IndexLevelReplicationTests.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -381,7 +381,8 @@ public void testReplicaOperationWithConcurrentPrimaryPromotion() throws Exceptio
381381
indexOnReplica(replicationRequest, shards, replica, primaryPrimaryTerm);
382382
successFullyIndexed.set(true);
383383
} catch (IllegalStateException ise) {
384-
assertThat(ise.getMessage(), either(containsString("is too old")).or(containsString("cannot be a replication target")));
384+
assertThat(ise.getMessage(), either(containsString("is too old"))
385+
.or(containsString("cannot be a replication target")).or(containsString("engine is closed")));
385386
} catch (Exception e) {
386387
throw new RuntimeException(e);
387388
}

0 commit comments

Comments
 (0)