Don't swallow IOExceptions in InternalTestCluster. (#39068)
Relates #39030
This commit is contained in:
parent
7f8a640363
commit
d8852b83d0
|
@ -844,17 +844,20 @@ public final class InternalTestCluster extends TestCluster {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public synchronized void close() {
|
public synchronized void close() throws IOException {
|
||||||
if (this.open.compareAndSet(true, false)) {
|
if (this.open.compareAndSet(true, false)) {
|
||||||
if (activeDisruptionScheme != null) {
|
if (activeDisruptionScheme != null) {
|
||||||
activeDisruptionScheme.testClusterClosed();
|
activeDisruptionScheme.testClusterClosed();
|
||||||
activeDisruptionScheme = null;
|
activeDisruptionScheme = null;
|
||||||
}
|
}
|
||||||
IOUtils.closeWhileHandlingException(nodes.values());
|
try {
|
||||||
|
IOUtils.close(nodes.values());
|
||||||
|
} finally {
|
||||||
nodes.clear();
|
nodes.clear();
|
||||||
executor.shutdownNow();
|
executor.shutdownNow();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public static final int REMOVED_MINIMUM_MASTER_NODES = Integer.MAX_VALUE;
|
public static final int REMOVED_MINIMUM_MASTER_NODES = Integer.MAX_VALUE;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue