From 0cb78c0a7b96fe83eebb774896499ecf94eeba61 Mon Sep 17 00:00:00 2001 From: Giovanni Meo Date: Tue, 6 Aug 2013 16:14:11 +0200 Subject: [PATCH] Small enhancement to ClusteringServicesIT - Enhance the clusteringServicesIT to be able to cover the case of the double update. Change-Id: Ic28c760ec06dc21ace51bcffb5b79255a289fa1a Signed-off-by: Giovanni Meo --- .../internal/ClusteringServicesIT.java | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/opendaylight/clustering/integrationtest/src/test/java/org/opendaylight/controller/clustering/services_implementation/internal/ClusteringServicesIT.java b/opendaylight/clustering/integrationtest/src/test/java/org/opendaylight/controller/clustering/services_implementation/internal/ClusteringServicesIT.java index 80f5558bcf..e40454dea2 100644 --- a/opendaylight/clustering/integrationtest/src/test/java/org/opendaylight/controller/clustering/services_implementation/internal/ClusteringServicesIT.java +++ b/opendaylight/clustering/integrationtest/src/test/java/org/opendaylight/controller/clustering/services_implementation/internal/ClusteringServicesIT.java @@ -362,6 +362,25 @@ public class ClusteringServicesIT { assertTrue(up.value.equals("baz")); assertTrue(up.cacheName.equals(cache1)); + /**********************************/ + /* RE-UPDATE AN EXISTING KEY CASE */ + /**********************************/ + // Start monitoring the updates + res = listener.restart(1); + // modify the cache + cm11.put(k1, "baz"); + // Wait + res.await(100L, TimeUnit.SECONDS); + // Analyze the updates + ups = listener.getUpdates(); + assertTrue(ups.size() == 1); + // Validate we get an update with expect fields + up = ups.get(0); + assertTrue(up.t.equals(UpdateType.CHANGED)); + assertTrue(up.key.equals(k1)); + assertTrue(up.value.equals("baz")); + assertTrue(up.cacheName.equals(cache1)); + /********************************/ /* REMOVAL OF EXISTING KEY CASE */ /********************************/ -- 2.36.6