Skip to content

Commit 7805588

Browse files
authored
Fail test if Node#awaitClose times out (#85238)
We rely on nodes stopping gracefully in integ tests, rather than timing out and using `ThreadPool#shutdownNow` to ignore any remaining cleanup work. Today we throw an `IOException` if the shutdown wasn't graceful. With this commit we move to an `AssertionError` so we can be sure that any such problems result in a test failure. Relates #85131
1 parent 8f9d2fa commit 7805588

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

test/framework/src/main/java/org/elasticsearch/test/InternalTestCluster.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1054,7 +1054,7 @@ public void close() throws IOException {
10541054
node.close();
10551055
try {
10561056
if (node.awaitClose(10, TimeUnit.SECONDS) == false) {
1057-
throw new IOException("Node didn't close within 10 seconds.");
1057+
throw new AssertionError("Node didn't close within 10 seconds.");
10581058
}
10591059
} catch (InterruptedException e) {
10601060
throw new AssertionError("Interruption while waiting for the node to close", e);

0 commit comments

Comments
 (0)