Skip to content

Commit

Permalink
Fix ConcurrentModification bug in TestNettyAllocator.testMemoryUsage()
Browse files Browse the repository at this point in the history
  • Loading branch information
danepitkin committed Apr 4, 2024
1 parent 7fafa78 commit 7f2a480
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -69,9 +69,12 @@ public void testMemoryUsage() {
break;
}
}
assertTrue("Log messages are:\n" +
synchronized (memoryLogsAppender.list) {
assertTrue("Log messages are:\n" +
memoryLogsAppender.list.stream().map(ILoggingEvent::toString).collect(Collectors.joining("\n")),
result);
}

} finally {
memoryLogsAppender.stop();
logger.detachAppender(memoryLogsAppender);
Expand Down

0 comments on commit 7f2a480

Please sign in to comment.