We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 07a8558 commit 94517c7Copy full SHA for 94517c7
server/src/test/java/org/elasticsearch/index/shard/IndexShardTests.java
@@ -5157,6 +5157,9 @@ public void testCloseShardWhileRetainingEngine() throws Exception {
5157
assertThat(primary.state(), equalTo(IndexShardState.CLOSED));
5158
expectThrows(AlreadyClosedException.class, () -> primary.getEngine());
5159
assertThat(primary.getEngineOrNull(), nullValue());
5160
+ expectThrows(AlreadyClosedException.class, () -> primary.withEngine(engine -> {
5161
+ throw new AssertionError("should have thrown");
5162
+ }));
5163
primary.withEngineOrNull(engine -> {
5164
assertThat(engine, nullValue());
5165
return null;
0 commit comments