Skip to content

Commit

Permalink
Edit TestArrowBuf#testEnabledHistoricalLog to have more info
Browse files Browse the repository at this point in the history
Log what message was reported if the message didn't contain
the correct information.
  • Loading branch information
jduo committed Nov 28, 2023
1 parent 93b186a commit 3d317e4
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -167,8 +167,9 @@ public void testEnabledHistoricalLog() {
fieldDebug.set(null, true);
try (BufferAllocator allocator = new RootAllocator(128)) {
allocator.buffer(2);
Exception e = assertThrows(IllegalStateException.class, () -> allocator.close());
assertTrue(e.getMessage().contains("event log for:")); // JDK8, JDK11
Exception e = assertThrows(IllegalStateException.class, allocator::close);
assertTrue("Exception had the following message: " + e.getMessage(),
e.getMessage().contains("event log for:")); // JDK8, JDK11
} finally {
fieldDebug.set(null, false);
}
Expand Down

0 comments on commit 3d317e4

Please sign in to comment.