Search in sources :

Example 1 with KafkaLogReader

use of co.cask.cdap.logging.read.KafkaLogReader in project cdap by caskdata.

the class TestKafkaLogging method testGetPrev.

@Test
public void testGetPrev() throws Exception {
    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.testGetPrev(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)

Example 2 with KafkaLogReader

use of co.cask.cdap.logging.read.KafkaLogReader 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

LoggingContext (co.cask.cdap.common.logging.LoggingContext)2 LoggingTester (co.cask.cdap.logging.appender.LoggingTester)2 FlowletLoggingContext (co.cask.cdap.logging.context.FlowletLoggingContext)2 KafkaLogReader (co.cask.cdap.logging.read.KafkaLogReader)2 Test (org.junit.Test)2