Skip to content

Commit 93c25da

Browse files
committed
sameInstance
1 parent 2411a9b commit 93c25da

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

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

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5202,9 +5202,11 @@ public void prepareForEngineReset() throws IOException {
52025202
});
52035203
});
52045204
holdEngineThread.start();
5205-
safeGet(hold);
5205+
var retainedInstance = safeGet(hold);
52065206

5207-
assertThat(shard.getEngine(), instanceOf(InternalEngine.class));
5207+
var currentInstance = shard.getEngine();
5208+
assertThat(currentInstance, instanceOf(InternalEngine.class));
5209+
assertThat(currentInstance, sameInstance(retainedInstance));
52085210

52095211
final var reset = new PlainActionFuture<Void>();
52105212
final var resetEngineThread = new Thread(() -> {

0 commit comments

Comments
 (0)