use of org.apache.log4j.spi.LoggingEvent in project carbondata by apache.
the class ExtendedRollingFileAppenderTest_UT method testSubAppendLoggingEvent.
@Test
public void testSubAppendLoggingEvent() {
Logger logger = Logger.getLogger(this.getClass());
LoggingEvent event = new LoggingEvent(null, logger, 0L, AuditLevel.DEBUG, null, null);
try {
rAppender.subAppend(event);
} catch (Exception e) {
//
}
Assert.assertTrue(true);
}
use of org.apache.log4j.spi.LoggingEvent in project cloudstack by apache.
the class SnmpEnhancedPatternLayoutTest method parseAlertTest.
@Test
public void parseAlertTest() {
LoggingEvent event = mock(LoggingEvent.class);
setMessage(" alertType:: 14 // dataCenterId:: 1 // podId:: 1 // " + "clusterId:: null // message:: Management" + " network CIDR is not configured originally. Set it default to 10.102.192.0/22", event);
SnmpTrapInfo info = _snmpEnhancedPatternLayout.parseEvent(event);
commonAssertions(info, "Management network CIDR is not configured originally. Set it default to 10.102.192" + ".0/22");
}
use of org.apache.log4j.spi.LoggingEvent in project cloudstack by apache.
the class SnmpEnhancedPatternLayoutTest method parseRandomTest.
@Test
public void parseRandomTest() {
LoggingEvent event = mock(LoggingEvent.class);
when(event.getRenderedMessage()).thenReturn("Problem clearing email alert");
assertNull(" Null value was expected ", _snmpEnhancedPatternLayout.parseEvent(event));
}
Aggregations