Package org.infinispan.test

Examples of org.infinispan.test.ViewChangeListener


         assert load(stores[0], key).equals(expected.get(key));
         assert load(stores[1], key) == null;
         assert load(stores[2], key) == null;
      }

      ViewChangeListener viewChangeListener = new ViewChangeListener(caches[1]);

      cm0.stop();

      viewChangeListener.waitForViewChange(60, TimeUnit.SECONDS);

      waitForPushStateCompletion(stores[1].pushStateFuture);

      // cache store 1 should have all state now, and store 2 should have nothing

      for (String key : expected.keySet()) {
         assert load(stores[1], key).equals(expected.get(key));
         assert load(stores[2], key) == null;
      }

      caches[1].put("h-key", "h-value");
      caches[2].put("i-key", "i-value");
      expected.put("h-key", "h-value");
      expected.put("i-key", "i-value");

      for (String key : expected.keySet()) {
         assert load(stores[1], key).equals(expected.get(key));
         assert load(stores[2], key) == null;
      }

      viewChangeListener = new ViewChangeListener(caches[2]);
      cm1.stop();
      viewChangeListener.waitForViewChange(60, TimeUnit.SECONDS);

      waitForPushStateCompletion(stores[2].pushStateFuture);

      for (String key : expected.keySet()) assert load(stores[2], key).equals(expected.get(key));
View Full Code Here


         assert load(stores[0], key).equals(expected.get(key));
         assert load(stores[1], key) == null;
         assert load(stores[2], key) == null;
      }

      ViewChangeListener viewChangeListener = new ViewChangeListener(caches[1]);

      cm0.stop();

      viewChangeListener.waitForViewChange(60, TimeUnit.SECONDS);

      waitForPushStateCompletion(stores[1].pushStateFuture);

      // cache store 1 should have all state now, and store 2 should have nothing

      for (String key : expected.keySet()) {
         assert load(stores[1], key).equals(expected.get(key));
         assert load(stores[2], key) == null;
      }

      caches[1].put("h-key", "h-value");
      caches[2].put("i-key", "i-value");
      expected.put("h-key", "h-value");
      expected.put("i-key", "i-value");

      for (String key : expected.keySet()) {
         assert load(stores[1], key).equals(expected.get(key));
         assert load(stores[2], key) == null;
      }

      viewChangeListener = new ViewChangeListener(caches[2]);
      cm1.stop();
      viewChangeListener.waitForViewChange(60, TimeUnit.SECONDS);

      waitForPushStateCompletion(stores[2].pushStateFuture);

      for (String key : expected.keySet()) assert load(stores[2], key).equals(expected.get(key));
View Full Code Here

         assert load(stores[0], key).equals(expected.get(key));
         assert load(stores[1], key) == null;
         assert load(stores[2], key) == null;
      }

      ViewChangeListener viewChangeListener = new ViewChangeListener(caches[1]);

      cm0.stop();

      viewChangeListener.waitForViewChange(60, TimeUnit.SECONDS);

      waitForPushStateCompletion(stores[1].pushStateFuture);

      // cache store 1 should have all state now, and store 2 should have nothing

      for (String key : expected.keySet()) {
         assert load(stores[1], key).equals(expected.get(key));
         assert load(stores[2], key) == null;
      }

      caches[1].put("h-key", "h-value");
      caches[2].put("i-key", "i-value");
      expected.put("h-key", "h-value");
      expected.put("i-key", "i-value");

      for (String key : expected.keySet()) {
         assert load(stores[1], key).equals(expected.get(key));
         assert load(stores[2], key) == null;
      }

      viewChangeListener = new ViewChangeListener(caches[2]);
      cm1.stop();
      viewChangeListener.waitForViewChange(60, TimeUnit.SECONDS);

      waitForPushStateCompletion(stores[2].pushStateFuture);

      for (String key : expected.keySet()) assert load(stores[2], key).equals(expected.get(key));
View Full Code Here

         assert load(stores[0], key).equals(expected.get(key));
         assert load(stores[1], key) == null;
         assert load(stores[2], key) == null;
      }

      ViewChangeListener viewChangeListener = new ViewChangeListener(caches[1]);

      cm0.stop();

      viewChangeListener.waitForViewChange(60, TimeUnit.SECONDS);

      waitForPushStateCompletion(stores[1].pushStateFuture);

      // cache store 1 should have all state now, and store 2 should have nothing

      for (String key : expected.keySet()) {
         assert load(stores[1], key).equals(expected.get(key));
         assert load(stores[2], key) == null;
      }

      caches[1].put("h-key", "h-value");
      caches[2].put("i-key", "i-value");
      expected.put("h-key", "h-value");
      expected.put("i-key", "i-value");

      for (String key : expected.keySet()) {
         assert load(stores[1], key).equals(expected.get(key));
         assert load(stores[2], key) == null;
      }

      viewChangeListener = new ViewChangeListener(caches[2]);
      cm1.stop();
      viewChangeListener.waitForViewChange(60, TimeUnit.SECONDS);

      waitForPushStateCompletion(stores[2].pushStateFuture);

      for (String key : expected.keySet()) assert load(stores[2], key).equals(expected.get(key));
View Full Code Here

         assert load(stores[0], key).equals(expected.get(key));
         assert load(stores[1], key) == null;
         assert load(stores[2], key) == null;
      }

      ViewChangeListener viewChangeListener = new ViewChangeListener(caches[1]);

      cm0.stop();

      viewChangeListener.waitForViewChange(60, TimeUnit.SECONDS);

      waitForPushStateCompletion(stores[1].pushStateFuture);

      // cache store 1 should have all state now, and store 2 should have nothing

      for (String key : expected.keySet()) {
         assert load(stores[1], key).equals(expected.get(key));
         assert load(stores[2], key) == null;
      }

      caches[1].put("h-key", "h-value");
      caches[2].put("i-key", "i-value");
      expected.put("h-key", "h-value");
      expected.put("i-key", "i-value");

      for (String key : expected.keySet()) {
         assert load(stores[1], key).equals(expected.get(key));
         assert load(stores[2], key) == null;
      }

      viewChangeListener = new ViewChangeListener(caches[2]);
      cm1.stop();
      viewChangeListener.waitForViewChange(60, TimeUnit.SECONDS);

      waitForPushStateCompletion(stores[2].pushStateFuture);

      for (String key : expected.keySet()) assert load(stores[2], key).equals(expected.get(key));
View Full Code Here

         assert load(stores[0], key).equals(expected.get(key));
         assert load(stores[1], key) == null;
         assert load(stores[2], key) == null;
      }

      ViewChangeListener viewChangeListener = new ViewChangeListener(caches[1]);

      cm0.stop();

      viewChangeListener.waitForViewChange(60, TimeUnit.SECONDS);

      waitForPushStateCompletion(stores[1].pushStateFuture);

      // cache store 1 should have all state now, and store 2 should have nothing

      for (String key : expected.keySet()) {
         assert load(stores[1], key).equals(expected.get(key));
         assert load(stores[2], key) == null;
      }

      caches[1].put("h-key", "h-value");
      caches[2].put("i-key", "i-value");
      expected.put("h-key", "h-value");
      expected.put("i-key", "i-value");

      for (String key : expected.keySet()) {
         assert load(stores[1], key).equals(expected.get(key));
         assert load(stores[2], key) == null;
      }

      viewChangeListener = new ViewChangeListener(caches[2]);
      cm1.stop();
      viewChangeListener.waitForViewChange(60, TimeUnit.SECONDS);

      waitForPushStateCompletion(stores[2].pushStateFuture);

      for (String key : expected.keySet()) assert load(stores[2], key).equals(expected.get(key));
View Full Code Here

TOP

Related Classes of org.infinispan.test.ViewChangeListener

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.