Fix resource leaks in test cases 63/28763/6
authorGary Wu <gary.wu1@huawei.com>
Fri, 23 Oct 2015 22:13:03 +0000 (15:13 -0700)
committerGerrit Code Review <gerrit@opendaylight.org>
Sat, 14 Nov 2015 14:40:15 +0000 (14:40 +0000)
Close AutoCloseable objects created in
test cases that were not being closed.
Add mock calls for close() methods that
now need to be stubbed.

Change-Id: Iab057a3a1850d024f02656eb1ae82c6fb1486030
Signed-off-by: Gary Wu <gary.wu1@huawei.com>
opendaylight/config/config-persister-file-xml-adapter/src/test/java/org/opendaylight/controller/config/persist/storage/file/xml/FileStorageAdapterTest.java
opendaylight/config/config-persister-impl/src/test/java/org/opendaylight/controller/config/persist/impl/PersisterAggregatorTest.java
opendaylight/config/logback-config/src/test/java/org/opendaylight/controller/config/yang/logback/config/ContextSetterImplTest.java
opendaylight/md-sal/sal-akka-raft/src/test/java/org/opendaylight/controller/cluster/raft/behaviors/AbstractLeaderElectionScenarioTest.java
opendaylight/md-sal/sal-akka-raft/src/test/java/org/opendaylight/controller/cluster/raft/behaviors/DelayedMessagesElectionScenarioTest.java
opendaylight/md-sal/sal-akka-raft/src/test/java/org/opendaylight/controller/cluster/raft/behaviors/PartitionedCandidateOnStartupElectionScenarioTest.java
opendaylight/md-sal/sal-akka-raft/src/test/java/org/opendaylight/controller/cluster/raft/behaviors/PartitionedLeadersElectionScenarioTest.java
opendaylight/md-sal/sal-binding-broker/src/test/java/org/opendaylight/controller/md/sal/binding/impl/test/BindingDOMDataBrokerAdapterTest.java
opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/utils/NormalizedNodeAggregatorTest.java
opendaylight/md-sal/sal-dom-xsql/src/main/java/org/opendaylight/controller/md/sal/dom/xsql/jdbc/JDBCConnection.java
opendaylight/md-sal/sal-remoterpc-connector/src/test/java/org/opendaylight/controller/remote/rpc/RemoteRpcProviderTest.java

index de5f41f..dc1fc78 100644 (file)
@@ -259,33 +259,36 @@ public class FileStorageAdapterTest {
         if (!file.exists()) {
             return;
         }
-        XmlFileStorageAdapter storage = new XmlFileStorageAdapter();
-        storage.setFileStorage(file);
+        try (XmlFileStorageAdapter storage = new XmlFileStorageAdapter()) {
+            storage.setFileStorage(file);
 
-        List<ConfigSnapshotHolder> elementOptional = storage.loadLastConfigs();
-        assertThat(elementOptional.size(), is(0));
+            List<ConfigSnapshotHolder> elementOptional = storage.loadLastConfigs();
+            assertThat(elementOptional.size(), is(0));
+        }
     }
 
     @Test(expected = NullPointerException.class)
     public void testNoProperties() throws Exception {
-        XmlFileStorageAdapter storage = new XmlFileStorageAdapter();
-        storage.loadLastConfigs();
+        try (XmlFileStorageAdapter storage = new XmlFileStorageAdapter()) {
+            storage.loadLastConfigs();
+        }
     }
 
     @Test(expected = NullPointerException.class)
     public void testNoProperties2() throws Exception {
-        XmlFileStorageAdapter storage = new XmlFileStorageAdapter();
-        storage.persistConfig(new ConfigSnapshotHolder() {
-            @Override
-            public String getConfigSnapshot() {
-                return mock(String.class);
-            }
-
-            @Override
-            public SortedSet<String> getCapabilities() {
-                return new TreeSet<>();
-            }
-        } );
+        try (XmlFileStorageAdapter storage = new XmlFileStorageAdapter()) {
+            storage.persistConfig(new ConfigSnapshotHolder() {
+                @Override
+                public String getConfigSnapshot() {
+                    return mock(String.class);
+                }
+
+                @Override
+                public SortedSet<String> getCapabilities() {
+                    return new TreeSet<>();
+                }
+            });
+        }
     }
 
     static String createConfig() {
index c45de31..cf183b8 100644 (file)
@@ -13,9 +13,9 @@ import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertFalse;
 import static org.junit.Assert.assertThat;
 import static org.junit.Assert.fail;
+import static org.mockito.Mockito.doNothing;
 import static org.mockito.Mockito.doReturn;
 import static org.mockito.Mockito.mock;
-import static org.opendaylight.controller.config.persist.impl.PersisterAggregator.PersisterWithConfiguration;
 
 import com.google.common.collect.Lists;
 import java.io.IOException;
@@ -27,6 +27,7 @@ import org.junit.Before;
 import org.junit.Test;
 import org.opendaylight.controller.config.persist.api.ConfigSnapshotHolder;
 import org.opendaylight.controller.config.persist.api.Persister;
+import org.opendaylight.controller.config.persist.impl.PersisterAggregator.PersisterWithConfiguration;
 import org.opendaylight.controller.config.persist.impl.osgi.ConfigPersisterActivator;
 import org.opendaylight.controller.config.persist.impl.osgi.PropertiesProviderBaseImpl;
 import org.opendaylight.controller.config.persist.storage.file.xml.XmlFileStorageAdapter;
@@ -97,17 +98,18 @@ public class PersisterAggregatorTest {
     @Test
     public void testNoopAdapter() throws Exception {
         final NoOpStorageAdapter noOpStorageAdapter = new NoOpStorageAdapter();
-        final PersisterAggregator persisterAggregator =
-                new PersisterAggregator(Lists.newArrayList(new PersisterWithConfiguration(noOpStorageAdapter, false)));
+        try (final PersisterAggregator persisterAggregator = new PersisterAggregator(
+                Lists.newArrayList(new PersisterWithConfiguration(noOpStorageAdapter, false)))) {
 
-        noOpStorageAdapter.instantiate(null);
+            noOpStorageAdapter.instantiate(null);
 
-        persisterAggregator.persistConfig(null);
-        persisterAggregator.loadLastConfigs();
-        persisterAggregator.persistConfig(null);
-        persisterAggregator.loadLastConfigs();
+            persisterAggregator.persistConfig(null);
+            persisterAggregator.loadLastConfigs();
+            persisterAggregator.persistConfig(null);
+            persisterAggregator.loadLastConfigs();
 
-        noOpStorageAdapter.close();
+            noOpStorageAdapter.close();
+        }
     }
 
     @Test
@@ -141,13 +143,14 @@ public class PersisterAggregatorTest {
     private Persister mockPersister(String name){
         Persister result = mock(Persister.class);
         doReturn("mock:" + name).when(result).toString();
+        doNothing().when(result).close();
         return result;
     }
 
     @Test
     public void loadLastConfig() throws Exception {
         List<PersisterWithConfiguration> persisterWithConfigurations = new ArrayList<>();
-        PersisterWithConfiguration first = new PersisterWithConfiguration(mock(Persister.class), false);
+        PersisterWithConfiguration first = new PersisterWithConfiguration(mockPersister("p0"), false);
 
         ConfigSnapshotHolder ignored = mockHolder("ignored");
         doReturn(Arrays.asList(ignored)).when(first.getStorage()).loadLastConfigs(); // should be ignored
@@ -164,9 +167,10 @@ public class PersisterAggregatorTest {
         persisterWithConfigurations.add(second);
         persisterWithConfigurations.add(third);
 
-        PersisterAggregator persisterAggregator = new PersisterAggregator(persisterWithConfigurations);
-        List<ConfigSnapshotHolder> configSnapshotHolderOptional = persisterAggregator.loadLastConfigs();
-        assertEquals(1, configSnapshotHolderOptional.size());
-        assertEquals(used, configSnapshotHolderOptional.get(0));
+        try (PersisterAggregator persisterAggregator = new PersisterAggregator(persisterWithConfigurations)) {
+            List<ConfigSnapshotHolder> configSnapshotHolderOptional = persisterAggregator.loadLastConfigs();
+            assertEquals(1, configSnapshotHolderOptional.size());
+            assertEquals(used, configSnapshotHolderOptional.get(0));
+        }
     }
 }
index 82bc586..9547112 100644 (file)
@@ -10,6 +10,7 @@ package org.opendaylight.controller.config.yang.logback.config;
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertFalse;
 import static org.mockito.Matchers.any;
+import static org.mockito.Mockito.doNothing;
 import static org.mockito.Mockito.doReturn;
 import static org.mockito.Mockito.mock;
 
@@ -19,6 +20,7 @@ import ch.qos.logback.core.Appender;
 import com.google.common.collect.HashMultimap;
 import com.google.common.collect.Lists;
 import com.google.common.collect.Multimap;
+import java.io.IOException;
 import java.util.Collection;
 import java.util.Iterator;
 import java.util.List;
@@ -42,6 +44,7 @@ public class ContextSetterImplTest {
         MockitoAnnotations.initMocks(this);
         LogbackRuntimeRegistration reg = mock(LogbackRuntimeRegistration.class);
         doReturn(reg).when(runtimeRegistratorMock).register(any(LogbackRuntimeMXBean.class));
+        doNothing().when(reg).close();
     }
 
     @Test
@@ -86,23 +89,24 @@ public class ContextSetterImplTest {
         assertLoggerWithAppenders("l2", "a22");
     }
 
-    private void createContextSetter(Multimap<String, String> loggersToAppenders) {
-        ContextSetterImpl setter = new ContextSetterImpl(runtimeRegistratorMock);
+    private void createContextSetter(Multimap<String, String> loggersToAppenders) throws IOException {
+        try (ContextSetterImpl setter = new ContextSetterImpl(runtimeRegistratorMock)) {
 
-        List<LoggerTO> logger = Lists.newArrayList();
-        List<ConsoleAppenderTO> consoleAppenders = Lists.newArrayList();
+            List<LoggerTO> logger = Lists.newArrayList();
+            List<ConsoleAppenderTO> consoleAppenders = Lists.newArrayList();
+
+            for (String loggerName : loggersToAppenders.keySet()) {
+                LoggerTO l1 = createLogger(loggerName, loggersToAppenders.get(loggerName));
+                logger.add(l1);
+                for (String appenderName : loggersToAppenders.get(loggerName)) {
+                    consoleAppenders.add(createConsoleAppender(appenderName));
+                }
 
-        for (String loggerName : loggersToAppenders.keySet()) {
-            LoggerTO l1 = createLogger(loggerName, loggersToAppenders.get(loggerName));
-            logger.add(l1);
-            for (String appenderName : loggersToAppenders.get(loggerName)) {
-                consoleAppenders.add(createConsoleAppender(appenderName));
             }
 
+            LogbackModule logbackModule = createLogbackModule(logger, consoleAppenders);
+            setter.updateContext(logbackModule);
         }
-
-        LogbackModule logbackModule = createLogbackModule(logger, consoleAppenders);
-        setter.updateContext(logbackModule);
     }
 
     private void assertLoggerWithAppenders(String name, String... appenders) {
index 50f0c7b..9b2b4d3 100644 (file)
@@ -162,7 +162,18 @@ public class AbstractLeaderElectionScenarioTest {
     }
 
     @After
-    public void tearDown() {
+    public void tearDown() throws Exception {
+
+        if (member1Actor.behavior != null) {
+            member1Actor.behavior.close();
+        }
+        if (member2Actor.behavior != null) {
+            member2Actor.behavior.close();
+        }
+        if (member3Actor.behavior != null) {
+            member3Actor.behavior.close();
+        }
+
         JavaTestKit.shutdownActorSystem(system);
     }
 
@@ -186,17 +197,20 @@ public class AbstractLeaderElectionScenarioTest {
         assertEquals(name + " behavior state", expState, actor.behavior.state());
     }
 
-    void initializeLeaderBehavior(MemberActor actor, RaftActorContext context,
-            int numActiveFollowers) throws Exception {
+    void initializeLeaderBehavior(MemberActor actor, RaftActorContext context, int numActiveFollowers) throws Exception {
         // Leader sends immediate heartbeats - we don't care about it so ignore it.
 
         actor.expectMessageClass(AppendEntriesReply.class, numActiveFollowers);
+
+        @SuppressWarnings("resource")
         Leader leader = new Leader(context);
         actor.waitForExpectedMessages(AppendEntriesReply.class);
+        // Delay assignment here so the AppendEntriesReply isn't forwarded to the behavior.
         actor.behavior = leader;
 
         actor.forwardCapturedMessagesToBehavior(AppendEntriesReply.class, ActorRef.noSender());
         actor.clear();
+
     }
 
     TestActorRef<MemberActor> newMemberActor(String name) throws Exception {
index 19dfe47..47bd459 100644 (file)
@@ -182,8 +182,7 @@ public class DelayedMessagesElectionScenarioTest extends AbstractLeaderElectionS
         DefaultConfigParamsImpl member2ConfigParams = newConfigParams();
         member2Context.setConfigParams(member2ConfigParams);
 
-        Follower member2Behavior = new Follower(member2Context);
-        member2Actor.behavior = member2Behavior;
+        member2Actor.behavior = new Follower(member2Context);
 
         // Create member 3's behavior initially as Follower
 
@@ -195,8 +194,7 @@ public class DelayedMessagesElectionScenarioTest extends AbstractLeaderElectionS
         DefaultConfigParamsImpl member3ConfigParams = newConfigParams();
         member3Context.setConfigParams(member3ConfigParams);
 
-        Follower member3Behavior = new Follower(member3Context);
-        member3Actor.behavior = member3Behavior;
+        member3Actor.behavior = new Follower(member3Context);
 
         // Create member 1's behavior initially as Leader
 
@@ -214,5 +212,6 @@ public class DelayedMessagesElectionScenarioTest extends AbstractLeaderElectionS
         member3Actor.clear();
 
         testLog.info("setupInitialMemberBehaviors ending");
+
     }
 }
index 7ab76d2..119816c 100644 (file)
@@ -218,8 +218,7 @@ public class PartitionedCandidateOnStartupElectionScenarioTest extends AbstractL
         DefaultConfigParamsImpl member2ConfigParams = newConfigParams();
         member2Context.setConfigParams(member2ConfigParams);
 
-        Follower member2Behavior = new Follower(member2Context);
-        member2Actor.behavior = member2Behavior;
+        member2Actor.behavior = new Follower(member2Context);
 
         // Create member 1's behavior as Leader.
 
@@ -250,5 +249,6 @@ public class PartitionedCandidateOnStartupElectionScenarioTest extends AbstractL
         member2Context.getTermInformation().update(3, member1Context.getId());
 
         testLog.info("setupInitialMember1AndMember2Behaviors ending");
+
     }
 }
index 9ad526c..d29a707 100644 (file)
@@ -286,8 +286,7 @@ public class PartitionedLeadersElectionScenarioTest extends AbstractLeaderElecti
         DefaultConfigParamsImpl member2ConfigParams = newConfigParams();
         member2Context.setConfigParams(member2ConfigParams);
 
-        Follower member2Behavior = new Follower(member2Context);
-        member2Actor.behavior = member2Behavior;
+        member2Actor.behavior = new Follower(member2Context);
 
         // Create member 3's behavior initially as Follower
 
@@ -299,8 +298,7 @@ public class PartitionedLeadersElectionScenarioTest extends AbstractLeaderElecti
         DefaultConfigParamsImpl member3ConfigParams = newConfigParams();
         member3Context.setConfigParams(member3ConfigParams);
 
-        Follower member3Behavior = new Follower(member3Context);
-        member3Actor.behavior = member3Behavior;
+        member3Actor.behavior = new Follower(member3Context);
 
         // Create member 1's behavior initially as Leader
 
index e2fceba..f8a95b7 100644 (file)
@@ -57,23 +57,26 @@ public class BindingDOMDataBrokerAdapterTest {
 
         BindingToNormalizedNodeCodec codec = new BindingToNormalizedNodeCodec(classLoadingStrategy, codecRegistry);
 
-        BindingDOMDataBrokerAdapter bindingDOMDataBrokerAdapter = new BindingDOMDataBrokerAdapter(dataBroker, codec);
-        Mockito.when(codecRegistry.toYangInstanceIdentifier(TOP_PATH)).thenReturn(yangInstanceIdentifier);
-
-        ArgumentCaptor<ClusteredDOMDataChangeListener> clusteredDOMListener = ArgumentCaptor.
-            forClass(ClusteredDOMDataChangeListener.class);
-        ArgumentCaptor<LogicalDatastoreType> logicalDatastoreType = ArgumentCaptor.forClass(LogicalDatastoreType.class);
-        ArgumentCaptor<AsyncDataBroker.DataChangeScope> dataChangeScope = ArgumentCaptor.
-            forClass(AsyncDataBroker.DataChangeScope.class);
-        ArgumentCaptor<YangInstanceIdentifier> yangInstanceIdentifier = ArgumentCaptor.
-            forClass(YangInstanceIdentifier.class);
-
-        TestListener listener = new TestListener();
-
-        bindingDOMDataBrokerAdapter.registerDataChangeListener(LogicalDatastoreType.OPERATIONAL, TOP_PATH, listener,
-            AsyncDataBroker.DataChangeScope.BASE);
-        Mockito.verify(dataBroker).registerDataChangeListener(logicalDatastoreType.capture(), yangInstanceIdentifier.capture(),
-            clusteredDOMListener.capture(), dataChangeScope.capture());
+        try (BindingDOMDataBrokerAdapter bindingDOMDataBrokerAdapter = new BindingDOMDataBrokerAdapter(dataBroker,
+                codec)) {
+            Mockito.when(codecRegistry.toYangInstanceIdentifier(TOP_PATH)).thenReturn(yangInstanceIdentifier);
+
+            ArgumentCaptor<ClusteredDOMDataChangeListener> clusteredDOMListener = ArgumentCaptor
+                    .forClass(ClusteredDOMDataChangeListener.class);
+            ArgumentCaptor<LogicalDatastoreType> logicalDatastoreType = ArgumentCaptor
+                    .forClass(LogicalDatastoreType.class);
+            ArgumentCaptor<AsyncDataBroker.DataChangeScope> dataChangeScope = ArgumentCaptor
+                    .forClass(AsyncDataBroker.DataChangeScope.class);
+            ArgumentCaptor<YangInstanceIdentifier> yangInstanceIdentifier = ArgumentCaptor
+                    .forClass(YangInstanceIdentifier.class);
+
+            TestListener listener = new TestListener();
+
+            bindingDOMDataBrokerAdapter.registerDataChangeListener(LogicalDatastoreType.OPERATIONAL, TOP_PATH,
+                    listener, AsyncDataBroker.DataChangeScope.BASE);
+            Mockito.verify(dataBroker).registerDataChangeListener(logicalDatastoreType.capture(),
+                    yangInstanceIdentifier.capture(), clusteredDOMListener.capture(), dataChangeScope.capture());
+        }
 
     }
 
index 8c86310..e176495 100644 (file)
@@ -70,27 +70,30 @@ public class NormalizedNodeAggregatorTest {
 
     }
 
-    public static NormalizedNode<?,?> getRootNode(NormalizedNode<?, ?> moduleNode, SchemaContext schemaContext) throws ReadFailedException, ExecutionException, InterruptedException {
-        InMemoryDOMDataStore store = new InMemoryDOMDataStore("test", Executors.newSingleThreadExecutor());
-        store.onGlobalContextUpdated(schemaContext);
+    public static NormalizedNode<?, ?> getRootNode(NormalizedNode<?, ?> moduleNode, SchemaContext schemaContext)
+            throws ReadFailedException, ExecutionException, InterruptedException {
+        try (InMemoryDOMDataStore store = new InMemoryDOMDataStore("test", Executors.newSingleThreadExecutor())) {
+            store.onGlobalContextUpdated(schemaContext);
 
-        DOMStoreWriteTransaction writeTransaction = store.newWriteOnlyTransaction();
+            DOMStoreWriteTransaction writeTransaction = store.newWriteOnlyTransaction();
 
-        writeTransaction.merge(YangInstanceIdentifier.builder().node(moduleNode.getNodeType()).build(), moduleNode);
+            writeTransaction.merge(YangInstanceIdentifier.builder().node(moduleNode.getNodeType()).build(), moduleNode);
 
-        DOMStoreThreePhaseCommitCohort ready = writeTransaction.ready();
+            DOMStoreThreePhaseCommitCohort ready = writeTransaction.ready();
 
-        ready.canCommit().get();
-        ready.preCommit().get();
-        ready.commit().get();
+            ready.canCommit().get();
+            ready.preCommit().get();
+            ready.commit().get();
 
-        DOMStoreReadTransaction readTransaction = store.newReadOnlyTransaction();
+            DOMStoreReadTransaction readTransaction = store.newReadOnlyTransaction();
 
-        CheckedFuture<Optional<NormalizedNode<?, ?>>, ReadFailedException> read = readTransaction.read(YangInstanceIdentifier.builder().build());
+            CheckedFuture<Optional<NormalizedNode<?, ?>>, ReadFailedException> read = readTransaction
+                    .read(YangInstanceIdentifier.builder().build());
 
-        Optional<NormalizedNode<?, ?>> nodeOptional = read.checkedGet();
+            Optional<NormalizedNode<?, ?>> nodeOptional = read.checkedGet();
 
-        return nodeOptional.get();
+            return nodeOptional.get();
+        }
     }
 
     public static NormalizedNode<?,?> findChildWithQName(Collection<NormalizedNode<?, ?>> collection, QName qName) {
index 24757e5..a6b5ca6 100644 (file)
@@ -100,17 +100,16 @@ public class JDBCConnection implements Connection, Runnable {
 
     public JDBCConnection(boolean server) {
         try {
-            ServerSocket s = new ServerSocket(50003);
-            socket = s.accept();
-            try {
-                in = new DataInputStream(new BufferedInputStream(
-                        socket.getInputStream()));
-                out = new DataOutputStream(new BufferedOutputStream(
-                        socket.getOutputStream()));
-                new JDBCObjectReader();
-                new Thread(this).start();
-            } catch (Exception err) {
-                err.printStackTrace();
+            try (ServerSocket s = new ServerSocket(50003)) {
+                socket = s.accept();
+                try {
+                    in = new DataInputStream(new BufferedInputStream(socket.getInputStream()));
+                    out = new DataOutputStream(new BufferedOutputStream(socket.getOutputStream()));
+                    new JDBCObjectReader();
+                    new Thread(this).start();
+                } catch (Exception err) {
+                    err.printStackTrace();
+                }
             }
         } catch (Exception err) {
             err.printStackTrace();
index 1187365..e1f93f8 100644 (file)
@@ -49,23 +49,23 @@ public class RemoteRpcProviderTest {
     system = null;
   }
 
-  @Test
-  public void testRemoteRpcProvider() throws Exception {
-    final RemoteRpcProvider rpcProvider = new RemoteRpcProvider(system, mock(DOMRpcProviderService.class),
-            new RemoteRpcProviderConfig(system.settings().config()));
-    final Broker.ProviderSession session = mock(Broker.ProviderSession.class);
-    final SchemaService schemaService = mock(SchemaService.class);
-    when(schemaService.getGlobalContext()). thenReturn(mock(SchemaContext.class));
-    when(session.getService(SchemaService.class)).thenReturn(schemaService);
-    when(session.getService(DOMRpcService.class)).thenReturn(mock(DOMRpcService.class));
+    @Test
+    public void testRemoteRpcProvider() throws Exception {
+        try (final RemoteRpcProvider rpcProvider = new RemoteRpcProvider(system, mock(DOMRpcProviderService.class),
+                new RemoteRpcProviderConfig(system.settings().config()))) {
+            final Broker.ProviderSession session = mock(Broker.ProviderSession.class);
+            final SchemaService schemaService = mock(SchemaService.class);
+            when(schemaService.getGlobalContext()).thenReturn(mock(SchemaContext.class));
+            when(session.getService(SchemaService.class)).thenReturn(schemaService);
+            when(session.getService(DOMRpcService.class)).thenReturn(mock(DOMRpcService.class));
 
-    rpcProvider.onSessionInitiated(session);
+            rpcProvider.onSessionInitiated(session);
 
-    final ActorRef actorRef = Await.result(
-            system.actorSelection(
-                    moduleConfig.getRpcManagerPath()).resolveOne(Duration.create(1, TimeUnit.SECONDS)),
-                                                                 Duration.create(2, TimeUnit.SECONDS));
+            final ActorRef actorRef = Await.result(
+                    system.actorSelection(moduleConfig.getRpcManagerPath()).resolveOne(
+                            Duration.create(1, TimeUnit.SECONDS)), Duration.create(2, TimeUnit.SECONDS));
 
-    Assert.assertTrue(actorRef.path().toString().contains(moduleConfig.getRpcManagerPath()));
-  }
+            Assert.assertTrue(actorRef.path().toString().contains(moduleConfig.getRpcManagerPath()));
+        }
+    }
 }

©2013 OpenDaylight, A Linux Foundation Collaborative Project. All Rights Reserved.
OpenDaylight is a registered trademark of The OpenDaylight Project, Inc.
Linux Foundation and OpenDaylight are registered trademarks of the Linux Foundation.
Linux is a registered trademark of Linus Torvalds.