Netty Replicator - improve the reconnection and keepalive mechanisms
[mdsal.git] / replicate / mdsal-replicate-netty / src / test / java / org / opendaylight / mdsal / replicate / netty / IntegrationTest.java
index 08bc369ce16841956b28dbdedfe9ca3cc1419cd6..5f0a06b082f5751faadc781d75f20cc82beffd4f 100644 (file)
@@ -81,7 +81,8 @@ public class IntegrationTest extends AbstractDataBrokerTest {
     @Test
     public void testSourceToSink() throws InterruptedException, ExecutionException {
         // Make sure to start source...
-        final Registration source = NettyReplication.createSource(support, getDomBroker(), css, true, TEST_PORT);
+        final Registration source = NettyReplication.createSource(support, getDomBroker(), css, true, TEST_PORT,
+            Duration.ZERO, 5);
         // ... and give it some time start up and open up the port
         Thread.sleep(1000);
 
@@ -95,7 +96,7 @@ public class IntegrationTest extends AbstractDataBrokerTest {
 
         // Kick of the sink ...
         final Registration sink = NettyReplication.createSink(support, sinkBroker, css, true,
-            Inet4Address.getLoopbackAddress(), TEST_PORT, Duration.ZERO, Duration.ZERO);
+            Inet4Address.getLoopbackAddress(), TEST_PORT, Duration.ZERO, Duration.ZERO, 3);
         // ... and sync on it starting up
 
         // verify the connection was established and MSG_EMPTY_DATA was transferred
@@ -126,7 +127,8 @@ public class IntegrationTest extends AbstractDataBrokerTest {
         generateModification(getDataBroker(), deltaCount);
 
         // Make sure to start source...
-        final Registration source = NettyReplication.createSource(support, getDomBroker(), css, true, TEST_PORT);
+        final Registration source = NettyReplication.createSource(support, getDomBroker(), css, true, TEST_PORT,
+            Duration.ZERO, 5);
         // ... and give it some time start up and open up the port
         Thread.sleep(1000);
 
@@ -140,7 +142,7 @@ public class IntegrationTest extends AbstractDataBrokerTest {
 
         // Kick of the sink ...
         final Registration sink = NettyReplication.createSink(support, sinkBroker, css, true,
-            Inet4Address.getLoopbackAddress(), TEST_PORT, Duration.ZERO, Duration.ZERO);
+            Inet4Address.getLoopbackAddress(), TEST_PORT, Duration.ZERO, Duration.ZERO, 3);
         // ... and sync on it starting up
 
         // verify the connection was established and MSG_EMPTY_DATA was transferred