mirror of https://github.com/apache/nifi.git
NIFI-9233 - Improve reliability of system integration tests (#5720)
This commit is contained in:
parent
038811d0dd
commit
27ceda38bf
|
@ -175,6 +175,26 @@ public class ZooKeeperStateServer extends ZooKeeperServerMain {
|
|||
if (started) {
|
||||
started = false;
|
||||
|
||||
if (quorumPeer != null && quorumPeer.isRunning()) {
|
||||
quorumPeer.shutdown();
|
||||
}
|
||||
|
||||
if (connectionFactory != null) {
|
||||
try {
|
||||
connectionFactory.shutdown();
|
||||
} catch (Exception e) {
|
||||
logger.warn("Failed to shutdown Connection Factory", e);
|
||||
}
|
||||
}
|
||||
|
||||
if (embeddedZkServer != null && embeddedZkServer.isRunning()) {
|
||||
try {
|
||||
embeddedZkServer.shutdown();
|
||||
} catch (Exception e) {
|
||||
logger.warn("Failed to shutdown Embedded Zookeeper", e);
|
||||
}
|
||||
}
|
||||
|
||||
if (transactionLog != null) {
|
||||
try {
|
||||
transactionLog.close();
|
||||
|
@ -183,18 +203,6 @@ public class ZooKeeperStateServer extends ZooKeeperServerMain {
|
|||
}
|
||||
}
|
||||
|
||||
if (connectionFactory != null) {
|
||||
connectionFactory.shutdown();
|
||||
}
|
||||
|
||||
if (quorumPeer != null && quorumPeer.isRunning()) {
|
||||
quorumPeer.shutdown();
|
||||
}
|
||||
|
||||
if (embeddedZkServer != null && embeddedZkServer.isRunning()) {
|
||||
embeddedZkServer.shutdown();
|
||||
}
|
||||
|
||||
if (datadirCleanupManager != null) {
|
||||
datadirCleanupManager.shutdown();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue