Skip to content

Commit

Permalink
Remove memory leaks in ConditionallyReliableLoggingHttpHandlerTest
Browse files Browse the repository at this point in the history
Signed-off-by: Andre Kurait <[email protected]>
  • Loading branch information
AndreKurait committed May 2, 2024
1 parent 751d880 commit 5632748
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,9 @@ private static void writeMessageAndVerify(byte[] fullTrafficBytes, Consumer<Embe
Assertions.assertTrue(!rootContext.instrumentationBundle.getFinishedSpans().isEmpty());
Assertions.assertTrue(!rootContext.instrumentationBundle.getFinishedMetrics().isEmpty());
}

channel.finishAndReleaseAll();
channel.close();
}
}

Expand Down Expand Up @@ -125,6 +128,7 @@ public void testThatSuppressedCaptureWorks() throws Exception {
new ConditionallyReliableLoggingHttpHandler(rootInstrumenter, "n", "c",
ctx -> offloader, headerCapturePredicate, x -> true));
getWriter(false, true, SimpleRequests.HEALTH_CHECK.getBytes(StandardCharsets.UTF_8)).accept(channel);
channel.finishAndReleaseAll();
channel.close();
var requestBytes = SimpleRequests.HEALTH_CHECK.getBytes(StandardCharsets.UTF_8);

Expand Down

0 comments on commit 5632748

Please sign in to comment.