Skip to content

Commit 94517c7

Browse files
committed
feedback
1 parent 07a8558 commit 94517c7

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

server/src/test/java/org/elasticsearch/index/shard/IndexShardTests.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5157,6 +5157,9 @@ public void testCloseShardWhileRetainingEngine() throws Exception {
51575157
assertThat(primary.state(), equalTo(IndexShardState.CLOSED));
51585158
expectThrows(AlreadyClosedException.class, () -> primary.getEngine());
51595159
assertThat(primary.getEngineOrNull(), nullValue());
5160+
expectThrows(AlreadyClosedException.class, () -> primary.withEngine(engine -> {
5161+
throw new AssertionError("should have thrown");
5162+
}));
51605163
primary.withEngineOrNull(engine -> {
51615164
assertThat(engine, nullValue());
51625165
return null;

0 commit comments

Comments
 (0)