Search in sources :

Example 11 with TaskApplication

use of org.apache.samza.application.TaskApplication in project samza by apache.

the class TestTaskApplicationDescriptorImpl method testAddTables.

@Test
public void testAddTables() {
    TaskApplication testApp = appDesc -> {
        mockTables.forEach(appDesc::withTable);
    };
    TaskApplicationDescriptorImpl appDesc = new TaskApplicationDescriptorImpl(testApp, config);
    assertEquals(mockTables, appDesc.getTableDescriptors());
}
Also used : InputDescriptor(org.apache.samza.system.descriptors.InputDescriptor) ApplicationContainerContextFactory(org.apache.samza.context.ApplicationContainerContextFactory) SystemDescriptor(org.apache.samza.system.descriptors.SystemDescriptor) TaskApplication(org.apache.samza.application.TaskApplication) TableDescriptor(org.apache.samza.table.descriptors.TableDescriptor) Set(java.util.Set) Test(org.junit.Test) TaskFactory(org.apache.samza.task.TaskFactory) Mockito.when(org.mockito.Mockito.when) ApplicationTaskContextFactory(org.apache.samza.context.ApplicationTaskContextFactory) ArrayList(java.util.ArrayList) Mockito.verify(org.mockito.Mockito.verify) HashSet(java.util.HashSet) List(java.util.List) BaseTableDescriptor(org.apache.samza.table.descriptors.BaseTableDescriptor) Optional(java.util.Optional) ProcessorLifecycleListenerFactory(org.apache.samza.runtime.ProcessorLifecycleListenerFactory) Config(org.apache.samza.config.Config) OutputDescriptor(org.apache.samza.system.descriptors.OutputDescriptor) Assert.assertEquals(org.junit.Assert.assertEquals) Before(org.junit.Before) Mockito.mock(org.mockito.Mockito.mock) TaskApplication(org.apache.samza.application.TaskApplication) Test(org.junit.Test)

Aggregations

TaskApplication (org.apache.samza.application.TaskApplication)11 Test (org.junit.Test)11 ArrayList (java.util.ArrayList)9 HashSet (java.util.HashSet)9 List (java.util.List)9 Optional (java.util.Optional)9 Set (java.util.Set)9 Config (org.apache.samza.config.Config)9 ApplicationContainerContextFactory (org.apache.samza.context.ApplicationContainerContextFactory)9 ApplicationTaskContextFactory (org.apache.samza.context.ApplicationTaskContextFactory)9 ProcessorLifecycleListenerFactory (org.apache.samza.runtime.ProcessorLifecycleListenerFactory)9 InputDescriptor (org.apache.samza.system.descriptors.InputDescriptor)9 OutputDescriptor (org.apache.samza.system.descriptors.OutputDescriptor)9 SystemDescriptor (org.apache.samza.system.descriptors.SystemDescriptor)9 BaseTableDescriptor (org.apache.samza.table.descriptors.BaseTableDescriptor)9 TableDescriptor (org.apache.samza.table.descriptors.TableDescriptor)9 TaskFactory (org.apache.samza.task.TaskFactory)9 Assert.assertEquals (org.junit.Assert.assertEquals)9 Before (org.junit.Before)9 Mockito.mock (org.mockito.Mockito.mock)9