File tree 1 file changed +5
-3
lines changed
java/memory/memory-core/src/test/java/org/apache/arrow/memory
1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -167,13 +167,15 @@ public void testEnabledHistoricalLog() {
167
167
fieldDebug .set (null , true );
168
168
try (BufferAllocator allocator = new RootAllocator (128 )) {
169
169
allocator .buffer (2 );
170
- Exception e = assertThrows (IllegalStateException .class , () -> allocator .close ());
171
- assertTrue (e .getMessage ().contains ("event log for:" )); // JDK8, JDK11
170
+ Exception e = assertThrows (IllegalStateException .class , allocator ::close );
171
+ assertTrue ("Exception had the following message: " + e .getMessage (),
172
+ e .getMessage ().contains ("event log for:" )); // JDK8, JDK11
172
173
} finally {
173
174
fieldDebug .set (null , false );
174
175
}
175
176
} catch (Exception e ) {
176
- assertTrue (e .toString ().contains ("java.lang.NoSuchFieldException: modifiers" )); // JDK17+
177
+ assertTrue ("Exception had the following toString(): " + e .toString (),
178
+ e .toString ().contains ("java.lang.NoSuchFieldException: modifiers" )); // JDK17+
177
179
} finally {
178
180
((Logger ) LoggerFactory .getLogger ("org.apache.arrow" )).setLevel (null );
179
181
}
You can’t perform that action at this time.
0 commit comments