Fix statistics race condition on big flows
[openflowplugin.git] / openflowplugin-impl / src / test / java / org / opendaylight / openflowplugin / impl / registry / group / DeviceGroupRegistryImplTest.java
index a0d74b049936b3d8458c2ac7d26436c701523442..6b62e9f16938bb320bf64f5b166dcaecd4aa7cc3 100644 (file)
@@ -40,29 +40,29 @@ public class DeviceGroupRegistryImplTest {
 
     @Test
     public void testRemoveMarked() throws Exception {
-        deviceGroupRegistry.markToBeremoved(groupId);
-        deviceGroupRegistry.removeMarked();
+        deviceGroupRegistry.addMark(groupId);
+        deviceGroupRegistry.processMarks();
         Assert.assertEquals(0, deviceGroupRegistry.getAllGroupIds().size());
     }
 
     @Test
     public void testRemoveMarkedNegative() throws Exception {
-        deviceGroupRegistry.markToBeremoved(groupId2);
-        deviceGroupRegistry.removeMarked();
+        deviceGroupRegistry.addMark(groupId2);
+        deviceGroupRegistry.processMarks();
         Assert.assertEquals(1, deviceGroupRegistry.getAllGroupIds().size());
     }
 
 
     @Test
     public void testClose() throws Exception {
-        deviceGroupRegistry.markToBeremoved(groupId);
+        deviceGroupRegistry.addMark(groupId);
         deviceGroupRegistry.close();
 
         Assert.assertEquals(0, deviceGroupRegistry.getAllGroupIds().size());
         deviceGroupRegistry.store(groupId);
         Assert.assertEquals(1, deviceGroupRegistry.getAllGroupIds().size());
-        deviceGroupRegistry.removeMarked();
+        deviceGroupRegistry.processMarks();
         Assert.assertEquals(1, deviceGroupRegistry.getAllGroupIds().size());
 
     }
-}
\ No newline at end of file
+}