Small enhancement to ClusteringServicesIT
[controller.git] / opendaylight / clustering / integrationtest / src / test / java / org / opendaylight / controller / clustering / services_implementation / internal / ClusteringServicesIT.java
index 80f5558bcf853d91e03cf35ed95ceac3bb1419b0..e40454dea2259c085e07fe3db3e9800dfef1209a 100644 (file)
@@ -362,6 +362,25 @@ public class ClusteringServicesIT {
             assertTrue(up.value.equals("baz"));\r
             assertTrue(up.cacheName.equals(cache1));\r
 \r
+            /**********************************/\r
+            /* RE-UPDATE AN EXISTING KEY CASE */\r
+            /**********************************/\r
+            // Start monitoring the updates\r
+            res = listener.restart(1);\r
+            // modify the cache\r
+            cm11.put(k1, "baz");\r
+            // Wait\r
+            res.await(100L, TimeUnit.SECONDS);\r
+            // Analyze the updates\r
+            ups = listener.getUpdates();\r
+            assertTrue(ups.size() == 1);\r
+            // Validate we get an update with expect fields\r
+            up = ups.get(0);\r
+            assertTrue(up.t.equals(UpdateType.CHANGED));\r
+            assertTrue(up.key.equals(k1));\r
+            assertTrue(up.value.equals("baz"));\r
+            assertTrue(up.cacheName.equals(cache1));\r
+\r
             /********************************/\r
             /* REMOVAL OF EXISTING KEY CASE */\r
             /********************************/\r