Package org.elasticsearch.test
Class MockLog.PatternSeenEventExpectation
java.lang.Object
org.elasticsearch.test.MockLog.PatternSeenEventExpectation
- All Implemented Interfaces:
MockLog.LoggingExpectation
- Enclosing class:
MockLog
public static class MockLog.PatternSeenEventExpectation
extends Object
implements MockLog.LoggingExpectation
-
Constructor Summary
ConstructorsConstructorDescriptionPatternSeenEventExpectation
(String name, String logger, org.apache.logging.log4j.Level level, String pattern) -
Method Summary
Modifier and TypeMethodDescriptionvoid
Returns if this expectation is matched, otherwise throws anAssertionError
.void
awaitMatched
(long millis) Returns if this expectation is matched within the given number of milliseconds, otherwise throws anAssertionError
.void
match
(org.apache.logging.log4j.core.LogEvent event) Called on everyLogEvent
received by the captured appenders.
-
Constructor Details
-
PatternSeenEventExpectation
-
-
Method Details
-
match
public void match(org.apache.logging.log4j.core.LogEvent event) Description copied from interface:MockLog.LoggingExpectation
Called on everyLogEvent
received by the captured appenders.- Specified by:
match
in interfaceMockLog.LoggingExpectation
-
assertMatched
public void assertMatched()Description copied from interface:MockLog.LoggingExpectation
Returns if this expectation is matched, otherwise throws anAssertionError
.- Specified by:
assertMatched
in interfaceMockLog.LoggingExpectation
-
awaitMatched
Description copied from interface:MockLog.LoggingExpectation
Returns if this expectation is matched within the given number of milliseconds, otherwise throws anAssertionError
.- Specified by:
awaitMatched
in interfaceMockLog.LoggingExpectation
- Throws:
InterruptedException
-