Examples of trigger()


Examples of org.infinispan.test.fwk.CheckPoint.trigger()

      // Allow the topology update to proceed on all the caches
      int postJoinTopologyId = duringJoinTopologyId + 1;
      checkPoint.trigger("allow_topology_" + postJoinTopologyId + "_on_" + address(0));
      checkPoint.trigger("allow_topology_" + postJoinTopologyId + "_on_" + address(1));
      checkPoint.trigger("allow_topology_" + postJoinTopologyId + "_on_" + address(2));

      // Wait for the topology to change everywhere
      TestingUtil.waitForRehashToComplete(cache0, cache1, cache2);

      // Allow the put command to throw an OutdatedTopologyException on cache1
View Full Code Here

Examples of org.infinispan.test.fwk.CheckPoint.trigger()

            return stm.getCacheTopology().getTopologyId() == initialTopologyId + 2;
         }
      });

      // Allow cache 0 to request transactions from caches 1 and 2 (in any order)
      checkPoint.trigger("OUT_GET_TRANSACTIONS_" + address(1));
      checkPoint.trigger("OUT_GET_TRANSACTIONS_" + address(2));
      checkPoint.awaitStrict("IN_GET_TRANSACTIONS_" + address(1), 10, SECONDS);
      checkPoint.awaitStrict("IN_GET_TRANSACTIONS_" + address(2), 10, SECONDS);

      // See which cache receives the START_STATE_TRANSFER command first. We'll kill the other.
View Full Code Here

Examples of org.infinispan.test.fwk.CheckPoint.trigger()

         }
      });

      // Allow cache 0 to request transactions from caches 1 and 2 (in any order)
      checkPoint.trigger("OUT_GET_TRANSACTIONS_" + address(1));
      checkPoint.trigger("OUT_GET_TRANSACTIONS_" + address(2));
      checkPoint.awaitStrict("IN_GET_TRANSACTIONS_" + address(1), 10, SECONDS);
      checkPoint.awaitStrict("IN_GET_TRANSACTIONS_" + address(2), 10, SECONDS);

      // See which cache receives the START_STATE_TRANSFER command first. We'll kill the other.
      String event = checkPoint.peek(5, TimeUnit.SECONDS, "IN_START_STATE_TRANSFER_" + address(1),
View Full Code Here

Examples of org.infinispan.test.fwk.CheckPoint.trigger()

      log.debugf("Data on node %s: %s", address(2), cache(2).keySet());

      // Now that we know which node to kill, allow the START_STATE_TRANSFER command to proceed.
      // The corresponding StateResponseCommand will be blocked on cache 0
      checkPoint.await("IN_START_STATE_TRANSFER_" + address(liveNode), 1, SECONDS);
      checkPoint.trigger("OUT_START_STATE_TRANSFER_" + address(liveNode));

      // Kill cache cacheToStop to force a topology update.
      // The topology update will remove the transfers from cache(nodeToKill).
      cache(nodeToKill).stop();
View Full Code Here

Examples of org.infinispan.test.fwk.CheckPoint.trigger()

      // The topology update will remove the transfers from cache(nodeToKill).
      cache(nodeToKill).stop();

      // Now allow cache 0 to process the state from cache(liveNode)
      checkPoint.awaitStrict("IN_RESPONSE_" + address(liveNode), 10, SECONDS);
      checkPoint.trigger("OUT_RESPONSE_" + address(liveNode));

      log.debugf("Received segments?");
      Thread.sleep(1000);

      // Wait for cache 0 to request the transactions for the failed segments from cache 1
View Full Code Here

Examples of org.infinispan.test.fwk.CheckPoint.trigger()

      log.debugf("Received segments?");
      Thread.sleep(1000);

      // Wait for cache 0 to request the transactions for the failed segments from cache 1
      checkPoint.awaitStrict("IN_GET_TRANSACTIONS_" + address(liveNode), 10, SECONDS);
      checkPoint.trigger("OUT_GET_TRANSACTIONS_" + address(liveNode));

      // ISPN-3120: Now cache 0 should think it finished receiving state. Allow all the commands to proceed.
      checkPoint.awaitStrict("IN_START_STATE_TRANSFER_" + address(liveNode), 10, SECONDS);
      checkPoint.trigger("OUT_START_STATE_TRANSFER_" + address(liveNode));
View Full Code Here

Examples of org.infinispan.test.fwk.CheckPoint.trigger()

      checkPoint.awaitStrict("IN_GET_TRANSACTIONS_" + address(liveNode), 10, SECONDS);
      checkPoint.trigger("OUT_GET_TRANSACTIONS_" + address(liveNode));

      // ISPN-3120: Now cache 0 should think it finished receiving state. Allow all the commands to proceed.
      checkPoint.awaitStrict("IN_START_STATE_TRANSFER_" + address(liveNode), 10, SECONDS);
      checkPoint.trigger("OUT_START_STATE_TRANSFER_" + address(liveNode));

      checkPoint.awaitStrict("IN_RESPONSE_" + address(liveNode), 10, SECONDS);
      checkPoint.trigger("OUT_RESPONSE_" + address(liveNode));

      TestingUtil.waitForRehashToComplete(cache(0), cache(liveNode));
View Full Code Here

Examples of org.infinispan.test.fwk.CheckPoint.trigger()

      // ISPN-3120: Now cache 0 should think it finished receiving state. Allow all the commands to proceed.
      checkPoint.awaitStrict("IN_START_STATE_TRANSFER_" + address(liveNode), 10, SECONDS);
      checkPoint.trigger("OUT_START_STATE_TRANSFER_" + address(liveNode));

      checkPoint.awaitStrict("IN_RESPONSE_" + address(liveNode), 10, SECONDS);
      checkPoint.trigger("OUT_RESPONSE_" + address(liveNode));

      TestingUtil.waitForRehashToComplete(cache(0), cache(liveNode));

      log.debugf("Final checkpoint status: %s", checkPoint);
      DataContainer dataContainer = TestingUtil.extractComponent(cache(0), DataContainer.class);
View Full Code Here

Examples of org.infinispan.test.fwk.CheckPoint.trigger()

      boolean blocked = checkPoint.peek(3, SECONDS, "pre_commit_entry_" + key + "_from_" + address(0)) == null;
      assertTrue(blocked);

      // Allow the command to commit (though it will still be blocked)
      // Trigger the event twice because the command may be retried (if the rebalance finishes first)
      checkPoint.trigger("resume_commit_entry_" + key + "_from_" + address(0), 2);

      // Allow state transfer to commit
      checkPoint.trigger("resume_commit_entry_" + key + "_from_" + null);

      // Wait for both state transfer and the command to commit
View Full Code Here

Examples of org.infinispan.test.fwk.CheckPoint.trigger()

      // Allow the command to commit (though it will still be blocked)
      // Trigger the event twice because the command may be retried (if the rebalance finishes first)
      checkPoint.trigger("resume_commit_entry_" + key + "_from_" + address(0), 2);

      // Allow state transfer to commit
      checkPoint.trigger("resume_commit_entry_" + key + "_from_" + null);

      // Wait for both state transfer and the command to commit
      checkPoint.awaitStrict("post_commit_entry_" + key + "_from_" + null, 10, SECONDS);
      checkPoint.awaitStrict("post_commit_entry_" + key + "_from_" + address(0), 10, SECONDS);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.