Package org.infinispan.test.fwk

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


      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),
            "IN_START_STATE_TRANSFER_" + address(2));
      int liveNode = event.endsWith(address(1).toString()) ? 1 : 2;
      int nodeToKill = liveNode == 1 ? 2 : 1;
      List<Address> keyOwners = cache(0).getAdvancedCache().getDistributionManager().locate(k1);
      log.debugf("Killing node %s. Key %s is located on %s", address(nodeToKill), k1, keyOwners);
View Full Code Here


            return op.perform(cache0, key);
         }
      });

      // Wait for the user tx/operation to call commitEntry on cache1
      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);
View Full Code Here

      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),
            "IN_START_STATE_TRANSFER_" + address(2));
      int liveNode = event.endsWith(address(1).toString()) ? 1 : 2;
      int nodeToKill = liveNode == 1 ? 2 : 1;
      List<Address> keyOwners = cache(0).getAdvancedCache().getDistributionManager().locate(k1);
      log.debugf("Killing node %s. Key %s is located on %s", address(nodeToKill), k1, keyOwners);
View Full Code Here

            return op.perform(cache0, key);
         }
      });

      // Check that the user write is blocked by the state transfer write
      boolean blocked = checkPoint.peek(3, SECONDS, "pre_commit_entry_" + key + "_from_" + address(0)) == null;
      assertTrue(blocked);

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

            return op.perform(cache0, key);
         }
      });

      // Wait for the user tx/operation to call commitEntry on cache1
      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)
      checkPoint.trigger("resume_commit_entry_" + key + "_from_" + address(0));
View Full Code Here

      checkPoint.trigger("OUT_GET_TRANSACTIONS_" + backup1);
      checkPoint.awaitStrict("IN_GET_TRANSACTIONS_" + primary, 10, SECONDS);
      checkPoint.awaitStrict("IN_GET_TRANSACTIONS_" + backup1, 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_" + primary,
            "IN_START_STATE_TRANSFER_" + backup1);
      Address liveNode = event.endsWith(primary.toString()) ? primary : backup1;
      Address nodeToKill = liveNode == primary ? backup1 : primary;
      List<Address> keyOwners = nonOwnerCache.getDistributionManager().locate(k1);
      log.debugf("Killing node %s. Key %s is located on %s", nodeToKill, k1, keyOwners);
View Full Code Here

            return op.perform(cache0, key);
         }
      });

      // Check that the user write is blocked by the state transfer write
      boolean blocked = checkPoint.peek(3, SECONDS, "pre_commit_entry_" + key + "_from_" + address(0)) == null;
      assertTrue(blocked);

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

      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),
            "IN_START_STATE_TRANSFER_" + address(2));
      int liveNode = event.endsWith(address(1).toString()) ? 1 : 2;
      int nodeToKill = liveNode == 1 ? 2 : 1;
      List<Address> keyOwners = cache(0).getAdvancedCache().getDistributionManager().locate(k1);
      log.debugf("Killing node %s. Key %s is located on %s", address(nodeToKill), k1, keyOwners);
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.