diff --git a/symmetric/src/test/java/org/jumpmind/symmetric/service/impl/OutgoingBatchServiceTest.java b/symmetric/src/test/java/org/jumpmind/symmetric/service/impl/OutgoingBatchServiceTest.java index 282a491f7c..11958962b3 100644 --- a/symmetric/src/test/java/org/jumpmind/symmetric/service/impl/OutgoingBatchServiceTest.java +++ b/symmetric/src/test/java/org/jumpmind/symmetric/service/impl/OutgoingBatchServiceTest.java @@ -223,7 +223,8 @@ public void testErrorChannel() { Assert.assertEquals(batches.size(), 3); String firstBatchId = batches.get(0).getBatchId(); String secondBatchId = batches.get(1).getBatchId(); - + String thirdBatchId = batches.get(2).getBatchId(); + // Ack the first batch as an error, leaving the others as new ArrayList ackList = new ArrayList(); ackList.add(new BatchInfo(firstBatchId, 1)); @@ -233,10 +234,13 @@ public void testErrorChannel() { batches = batchService.getOutgoingBatches(TestConstants.TEST_CLIENT_EXTERNAL_ID); Assert.assertNotNull(batches); Assert.assertEquals(batches.size(), 3); + Assert.assertEquals(batches.get(0).getBatchId(), secondBatchId, + "Channel in error should have batches last - missing new batch"); Assert.assertEquals(batches.get(1).getBatchId(), firstBatchId, "Channel in error should have batches last - missing error batch"); - Assert.assertEquals(batches.get(2).getBatchId(), secondBatchId, + Assert.assertEquals(batches.get(2).getBatchId(), thirdBatchId, "Channel in error should have batches last - missing new batch"); + } protected void createDataEvent(String tableName, int auditId, String channelId, DataEventType type, diff --git a/symmetric/src/test/resources/test-continuous-setup.sql b/symmetric/src/test/resources/test-continuous-setup.sql index 7368e7c276..496a134cef 100644 --- a/symmetric/src/test/resources/test-continuous-setup.sql +++ b/symmetric/src/test/resources/test-continuous-setup.sql @@ -1,5 +1,5 @@ insert into sym_channel values('testchannel', 1, 50, 50, 1, null); -insert into sym_channel values('config', 1, 50, 50, 1, null); +insert into sym_channel values('config', 0, 50, 50, 1, null); insert into sym_node_group values ('symmetric','a group representing symmetric configuration'); insert into sym_node_group values ('test-root-group','a test config'); insert into sym_node_group values ('test-node-group','a test config');