Skip to content

Commit

Permalink
HDDS-1174. Freon tests are failing with null pointer exception.
Browse files Browse the repository at this point in the history
Contributed by Shashikant Banerjee.
  • Loading branch information
anuengineer committed Feb 26, 2019
1 parent a106d2d commit a5a751b
Showing 1 changed file with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,9 @@ public void init(OzoneConfiguration configuration) throws IOException {
for (FreonOps ops : FreonOps.values()) {
histograms.add(ops.ordinal(), new Histogram(new UniformReservoir()));
}
freon.startHttpServer();
if (freon != null) {
freon.startHttpServer();
}
}

@Override
Expand Down Expand Up @@ -296,7 +298,9 @@ private void addShutdownHook() {
Runtime.getRuntime().addShutdownHook(
new Thread(() -> {
printStats(System.out);
freon.stopHttpServer();
if (freon != null) {
freon.stopHttpServer();
}
}));
}
/**
Expand Down

0 comments on commit a5a751b

Please sign in to comment.