Search in sources :

Example 11 with FlowletLoggingContext

use of co.cask.cdap.logging.context.FlowletLoggingContext in project cdap by caskdata.

the class TestKafkaLogging method testGetNext.

@Test
public void testGetNext() throws Exception {
    // Check with null runId and null instanceId
    LoggingContext loggingContext = new FlowletLoggingContext("TKL_NS_1", "APP_1", "FLOW_1", "", "RUN1", "INSTANCE1");
    KafkaLogReader logReader = KAFKA_TESTER.getInjector().getInstance(KafkaLogReader.class);
    LoggingTester tester = new LoggingTester();
    tester.testGetNext(logReader, loggingContext);
}
Also used : KafkaLogReader(co.cask.cdap.logging.read.KafkaLogReader) LoggingTester(co.cask.cdap.logging.appender.LoggingTester) LoggingContext(co.cask.cdap.common.logging.LoggingContext) FlowletLoggingContext(co.cask.cdap.logging.context.FlowletLoggingContext) FlowletLoggingContext(co.cask.cdap.logging.context.FlowletLoggingContext) Test(org.junit.Test)

Aggregations

FlowletLoggingContext (co.cask.cdap.logging.context.FlowletLoggingContext)11 Test (org.junit.Test)8 LoggingContext (co.cask.cdap.common.logging.LoggingContext)7 LoggingTester (co.cask.cdap.logging.appender.LoggingTester)7 FileLogReader (co.cask.cdap.logging.read.FileLogReader)4 CConfiguration (co.cask.cdap.common.conf.CConfiguration)3 Logger (org.slf4j.Logger)3 LoggerContext (ch.qos.logback.classic.LoggerContext)2 MetricsCollectionService (co.cask.cdap.api.metrics.MetricsCollectionService)2 ConfigModule (co.cask.cdap.common.guice.ConfigModule)2 NonCustomLocationUnitTestModule (co.cask.cdap.common.guice.NonCustomLocationUnitTestModule)2 DataSetsModules (co.cask.cdap.data.runtime.DataSetsModules)2 LoggingConfiguration (co.cask.cdap.logging.LoggingConfiguration)2 LogAppenderInitializer (co.cask.cdap.logging.appender.LogAppenderInitializer)2 LocalLogAppender (co.cask.cdap.logging.framework.local.LocalLogAppender)2 LoggingModules (co.cask.cdap.logging.guice.LoggingModules)2 KafkaLogReader (co.cask.cdap.logging.read.KafkaLogReader)2 Injector (com.google.inject.Injector)2 File (java.io.File)2 TransactionManager (org.apache.tephra.TransactionManager)2