Skip to content

Commit b99be13

Browse files
authored
SOLR-18283: Catch and ignore shutdown exceptions. (#4583)
1 parent 7b9b3d3 commit b99be13

1 file changed

Lines changed: 11 additions & 5 deletions

File tree

solr/cross-dc-manager/src/test/org/apache/solr/crossdc/manager/SolrAndKafkaReindexTest.java

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -130,12 +130,18 @@ public static void afterSolrAndKafkaIntegrationTest() throws Exception {
130130
ObjectReleaseTracker.clear();
131131

132132
if (solrCluster1 != null) {
133-
solrCluster1.getZkServer().getZkClient().printLayoutToStream(System.out);
134-
solrCluster1.shutdown();
133+
try {
134+
solrCluster1.shutdown();
135+
} catch (Exception e) {
136+
log.error("Exception shutting down solrCluster1, ignoring.", e);
137+
}
135138
}
136139
if (solrCluster2 != null) {
137-
solrCluster2.getZkServer().getZkClient().printLayoutToStream(System.out);
138-
solrCluster2.shutdown();
140+
try {
141+
solrCluster2.shutdown();
142+
} catch (Exception e) {
143+
log.error("Exception shutting down solrCluster2, ignoring.", e);
144+
}
139145
}
140146

141147
if (consumer != null) {
@@ -147,7 +153,7 @@ public static void afterSolrAndKafkaIntegrationTest() throws Exception {
147153
kafkaCluster.stop();
148154
}
149155
} catch (Exception e) {
150-
log.error("Exception stopping Kafka cluster", e);
156+
log.error("Exception stopping Kafka cluster, ignoring", e);
151157
}
152158

153159
solrCluster1 = null;

0 commit comments

Comments
 (0)