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 TypeMethodDescriptionvoidReturns if this expectation is matched, otherwise throws anAssertionError.voidawaitMatched(long millis) Returns if this expectation is matched within the given number of milliseconds, otherwise throws anAssertionError.voidmatch(org.apache.logging.log4j.core.LogEvent event) Called on everyLogEventreceived 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.LoggingExpectationCalled on everyLogEventreceived by the captured appenders.- Specified by:
matchin interfaceMockLog.LoggingExpectation
-
assertMatched
public void assertMatched()Description copied from interface:MockLog.LoggingExpectationReturns if this expectation is matched, otherwise throws anAssertionError.- Specified by:
assertMatchedin interfaceMockLog.LoggingExpectation
-
awaitMatched
Description copied from interface:MockLog.LoggingExpectationReturns if this expectation is matched within the given number of milliseconds, otherwise throws anAssertionError.- Specified by:
awaitMatchedin interfaceMockLog.LoggingExpectation- Throws:
InterruptedException
-