Create SemaphoreKeeper inside decorators
[openflowplugin.git] / applications / forwardingrules-sync / src / test / java / org / opendaylight / openflowplugin / applications / frsync / impl / SyncReactorFutureZipDecoratorTest.java
index 9180e62b87e06813a6a25c5d923526ae3537f463..6b59c9b3e22474c496d5ecab7ed497377722ce95 100644 (file)
@@ -65,7 +65,7 @@ public class SyncReactorFutureZipDecoratorTest {
     public void setUp() {
         final ExecutorService executorService = Executors.newSingleThreadExecutor(new ThreadFactoryBuilder()
                 .setDaemon(false)
-                .setNameFormat("frsync-test%d")
+                .setNameFormat("frsync-test-%d")
                 .setUncaughtExceptionHandler((thread, e) -> LOG.error("Uncaught exception {}", thread, e))
                 .build());
         syncThreadPool = MoreExecutors.listeningDecorator(executorService);
@@ -82,7 +82,7 @@ public class SyncReactorFutureZipDecoratorTest {
         final CountDownLatch latchForFirst = new CountDownLatch(1);
         final CountDownLatch latchForNext = new CountDownLatch(1);
 
-        final SyncupEntry first = new SyncupEntry(dataBefore, configDS, null, configDS);
+        final SyncupEntry first = new SyncupEntry(dataBefore, configDS, null, operationalDS);
         final SyncupEntry second = new SyncupEntry(dataAfter, configDS, dataBefore, configDS);
         final SyncupEntry third = new SyncupEntry(null, configDS, dataAfter, configDS);
         final SyncupEntry fourth = new SyncupEntry(dataAfter2, configDS, null, configDS);
@@ -202,8 +202,8 @@ public class SyncReactorFutureZipDecoratorTest {
         Mockito.verify(delegate, Mockito.times(1)).syncup(fcNodePath, second);
     }
 
-    private void mockSyncupWithEntry(final SyncupEntry entry) throws InterruptedException {
-        Mockito.when(delegate.syncup(Matchers.<InstanceIdentifier<FlowCapableNode>>any(), Mockito.eq(entry)))
+    private void mockSyncupWithEntry(final SyncupEntry entry) {
+        Mockito.when(delegate.syncup(Matchers.any(), Mockito.eq(entry)))
                 .thenReturn(Futures.immediateFuture(Boolean.TRUE));
     }