Search in sources :

Example 41 with Trigger

use of org.jumpmind.symmetric.model.Trigger in project symmetric-ds by JumpMind.

the class RouterServiceTest method testNotProducesCommonBatchesMultipleTablesTwoChannelsMultipleRoutersSyncOnIncoming.

@Test
public void testNotProducesCommonBatchesMultipleTablesTwoChannelsMultipleRoutersSyncOnIncoming() {
    List<TriggerRouter> triggerRouters = new ArrayList<TriggerRouter>();
    Trigger tableTrigger = new Trigger("a", CHANNEL_2_TEST.getChannelId(), true);
    triggerRouters.add(new TriggerRouter(tableTrigger, new Router("test", SOURCE_NODE_GROUP, TARGET_NODE_GROUP, "default")));
    triggerRouters.add(new TriggerRouter(tableTrigger, new Router("test", TARGET_NODE_GROUP, SOURCE_NODE_GROUP, "default")));
    assertTrue(!routerService.producesCommonBatches(CHANNEL_2_TEST, SOURCE_NODE_GROUP, triggerRouters));
}
Also used : Trigger(org.jumpmind.symmetric.model.Trigger) ArrayList(java.util.ArrayList) TriggerRouter(org.jumpmind.symmetric.model.TriggerRouter) Router(org.jumpmind.symmetric.model.Router) TriggerRouter(org.jumpmind.symmetric.model.TriggerRouter) Test(org.junit.Test)

Example 42 with Trigger

use of org.jumpmind.symmetric.model.Trigger in project symmetric-ds by JumpMind.

the class RouterServiceTest method testProducesCommonBatchesOneTableOneChannelDefaultRouter.

@Test
public void testProducesCommonBatchesOneTableOneChannelDefaultRouter() {
    List<TriggerRouter> triggerRouters = new ArrayList<TriggerRouter>();
    triggerRouters.add(new TriggerRouter(new Trigger("a", CHANNEL_2_TEST.getChannelId()), new Router("test", SOURCE_NODE_GROUP, TARGET_NODE_GROUP, "default")));
    assertTrue(routerService.producesCommonBatches(CHANNEL_2_TEST, SOURCE_NODE_GROUP, triggerRouters));
}
Also used : Trigger(org.jumpmind.symmetric.model.Trigger) ArrayList(java.util.ArrayList) TriggerRouter(org.jumpmind.symmetric.model.TriggerRouter) Router(org.jumpmind.symmetric.model.Router) TriggerRouter(org.jumpmind.symmetric.model.TriggerRouter) Test(org.junit.Test)

Aggregations

Trigger (org.jumpmind.symmetric.model.Trigger)42 TriggerRouter (org.jumpmind.symmetric.model.TriggerRouter)20 ArrayList (java.util.ArrayList)17 TriggerHistory (org.jumpmind.symmetric.model.TriggerHistory)14 Router (org.jumpmind.symmetric.model.Router)13 ITriggerRouterService (org.jumpmind.symmetric.service.ITriggerRouterService)11 Test (org.junit.Test)11 Date (java.util.Date)5 Table (org.jumpmind.db.model.Table)5 CsvData (org.jumpmind.symmetric.io.data.CsvData)5 Data (org.jumpmind.symmetric.model.Data)5 Node (org.jumpmind.symmetric.model.Node)5 HashSet (java.util.HashSet)4 ISqlTransaction (org.jumpmind.db.sql.ISqlTransaction)4 HashMap (java.util.HashMap)3 Set (java.util.Set)3 ISymmetricDialect (org.jumpmind.symmetric.db.ISymmetricDialect)3 NodeGroupLink (org.jumpmind.symmetric.model.NodeGroupLink)3 INodeService (org.jumpmind.symmetric.service.INodeService)3 List (java.util.List)2