BUG-5280: make sure all DistributedDataStore instances are shut down
[controller.git] / opendaylight / md-sal / sal-distributed-datastore / src / test / java / org / opendaylight / controller / cluster / datastore / MemberNode.java
index d018ce4a91019e97a607ae96cef592bd571e4d6a..de751beeb9d91a16dd3f013de2bfdb067d112a27 100644 (file)
@@ -112,8 +112,13 @@ public class MemberNode {
     public void cleanup() {
         if(!cleanedUp) {
             cleanedUp = true;
-            kit.cleanup(configDataStore);
-            kit.cleanup(operDataStore);
+            if (configDataStore != null) {
+                configDataStore.close();
+            }
+            if (operDataStore != null) {
+                operDataStore.close();
+            }
+
             IntegrationTestKit.shutdownActorSystem(kit.getSystem(), Boolean.TRUE);
         }
     }