Skip to content

Commit

Permalink
[hotfix][kafka,test] Handle shutdownCluster even if it wasn't initial…
Browse files Browse the repository at this point in the history
…ized

Previously null pointer exception thrown from @afterclass shutdown call could hide
original underlying issue if there was a failure that prevented kafkaServer from being constructed
  • Loading branch information
pnowojski committed May 7, 2019
1 parent 39710d3 commit b20e57d
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,9 @@ protected static void shutdownClusters() throws Exception {
secureProps.clear();
}

kafkaServer.shutdown();
if (kafkaServer != null) {
kafkaServer.shutdown();
}
}

// ------------------------------------------------------------------------
Expand Down

0 comments on commit b20e57d

Please sign in to comment.