mirror of https://github.com/apache/activemq.git
[AMQ-9258] Add NPE guards to kahadb test that intermittently fails on slower CI servers (#1006)
(cherry picked from commit 0a042964c8
)
This commit is contained in:
parent
53f2b4a0cb
commit
3d21425d37
|
@ -239,8 +239,13 @@ public class JournalCorruptionEofIndexRecoveryTest {
|
|||
final var appender = new AbstractAppender("testAppender", new AbstractFilter() {}, new MessageLayout(), false, new Property[0]) {
|
||||
@Override
|
||||
public void append(LogEvent event) {
|
||||
if (event.getLevel() == Level.WARN
|
||||
if (event != null
|
||||
&& event.getLevel() == Level.WARN
|
||||
&& event.getMessage() != null
|
||||
&& event.getMessage().getFormattedMessage() != null
|
||||
&& event.getMessage().getFormattedMessage().contains("Cannot recover message audit")
|
||||
&& event.getThrown() != null
|
||||
&& event.getThrown().getLocalizedMessage() != null
|
||||
&& event.getThrown().getLocalizedMessage().contains("Invalid location size")) {
|
||||
trappedExpectedLogMessage.set(true);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue