Package com.sun.sgs.test.util

Examples of com.sun.sgs.test.util.SgsTestNode


    @Test
    @IntegrationTest
    public void testChannelSendToExistingMembersAfterCoordinatorFailure()
  throws Exception
    {
  SgsTestNode coordinatorNode = addNode();
  SgsTestNode otherNode = addNode();
  ConfigurableNodePolicy.setRoundRobinPolicy();
 
  // create channels on specific node which will be the coordinator node
  String[] channelNames = new String[] {"channel1", "channel2"};
  for (String channelName : channelNames) {
View Full Code Here


    public void testSendFromClientSessionWithDelayedJoin() throws Exception {
  String user = "user";
  String channelName = "test";
  // Create channel with coordinator on server node.
  createChannel(channelName);
  SgsTestNode userNode = addNode();
  DummyClient client = new DummyClient(user);
  client.connect(userNode.getAppPort()).login();
  try {
      holdChannelServerMethodToNode(userNode, "join");
      joinUsers(channelName, user);
      waitForHeldChannelServerMethodToNode(userNode);
      for (int i = 0; i < 3; i++) {
View Full Code Here

    public void testSendFromClientSessionWithDelayedLeave() throws Exception {
  String user = "user";
  String channelName = "test";
  // Create channel with coordinator on server node.
  createChannel(channelName);
  SgsTestNode userNode = addNode();
  DummyClient client = new DummyClient(user);
  client.connect(userNode.getAppPort()).login();
  try {
      joinUsers(channelName, user);
      client.assertJoinedChannel(channelName);
      client.sendChannelMessage(channelName, 0);
      checkChannelMessagesReceived(client, channelName, 1);
View Full Code Here

    {
  String user = "user";
  String channelName = "test";
  // Create channel with coordinator on server node.
  createChannel(channelName);
  SgsTestNode userNode = addNode();
  DummyClient client = new DummyClient(user);
  client.connect(userNode.getAppPort()).login();
  try {
      holdChannelServerMethodToNode(userNode, "join");
      joinUsers(channelName, user);
      waitForHeldChannelServerMethodToNode(userNode);
      leaveUsers(channelName, user);
View Full Code Here

    {
  String user = "user";
  String channelName = "test";
  // Create channel with coordinator on server node.
  createChannel(channelName);
  SgsTestNode userNode = addNode();
  DummyClient client = new DummyClient(user);
  client.connect(userNode.getAppPort()).login();
  try {
      holdChannelServerMethodToNode(userNode, "join");
      joinUsers(channelName, user);
      waitForHeldChannelServerMethodToNode(userNode);
      leaveUsers(channelName, user);
View Full Code Here

    public void testSendFromClientSessionWithDelayedJoinAndCoordinatorCrash()
  throws Exception
    {
  String user = "user";
  String channelName = "test";
  SgsTestNode coordinatorNode = addNode();
  // Create channel with coordinator on coordinator node.
  createChannel(channelName, null, coordinatorNode);
  SgsTestNode userNode = addNode();
  DummyClient client = new DummyClient(user);
  client.connect(userNode.getAppPort()).login();
  try {
      holdChannelServerMethodToNode(userNode, "join");
      joinUsers(channelName, user);
      waitForHeldChannelServerMethodToNode(userNode);
      for (int i = 0; i < 3; i++) {
View Full Code Here

  testSendFromClientSessionWithDelayedLeaveAndCoordinatorCrash()
      throws Exception
    {
  String user = "user";
  String channelName = "test";
  SgsTestNode coordinatorNode = addNode();
  // Create channel with coordinator on server node.
  createChannel(channelName, null, coordinatorNode);
  SgsTestNode userNode = addNode();
  DummyClient client = new DummyClient(user);
  client.connect(userNode.getAppPort()).login();
  try {
      joinUsers(channelName, user);
      client.assertJoinedChannel(channelName);
      client.sendChannelMessage(channelName, 0);
      checkChannelMessagesReceived(client, channelName, 1);
View Full Code Here

  testSendFromClientSessionWithDelayedJoinLeaveAndCoordinatorCrash()
      throws Exception
    {
  String user = "user";
  String channelName = "test";
  SgsTestNode coordinatorNode = addNode();
  // Create channel with coordinator on coordinator node.
  createChannel(channelName, null, coordinatorNode);
  SgsTestNode userNode = addNode();
  DummyClient client = new DummyClient(user);
  client.connect(userNode.getAppPort()).login();
  try {
      holdChannelServerMethodToNode(userNode, "join");
      joinUsers(channelName, user);
      waitForHeldChannelServerMethodToNode(userNode);
      leaveUsers(channelName, user);
View Full Code Here

  testSendFromClientSessionWithDelayedJoinLeaveJoinAndCoordinatorCrash()
      throws Exception
    {
  String user = "user";
  String channelName = "test";
  SgsTestNode coordinatorNode = addNode();
  // Create channel with coordinator on server node.
  createChannel(channelName, null, coordinatorNode);
  SgsTestNode userNode = addNode();
  DummyClient client = new DummyClient(user);
  client.connect(userNode.getAppPort()).login();
  try {
      holdChannelServerMethodToNode(userNode, "join");
      joinUsers(channelName, user);
      waitForHeldChannelServerMethodToNode(userNode);
      leaveUsers(channelName, user);
View Full Code Here

    @Test
    @IntegrationTest
    public void testSendWithCoordinatorCrash() throws Exception {
  String user = "user";
  String channelName = "test";
  SgsTestNode coordinatorNode = addNode();
  // Create channel with coordinator on coordinator node.
  createChannel(channelName, null, coordinatorNode);
  SgsTestNode userNode = addNode();
  DummyClient client = new DummyClient(user);
  client.connect(userNode.getAppPort()).login();
  try {
      joinUsers(channelName, user);
      client.assertJoinedChannel(channelName);
      holdChannelServerMethodToNode(userNode, "send");
      for (int i = 0; i < 3; i++) {
View Full Code Here

TOP

Related Classes of com.sun.sgs.test.util.SgsTestNode

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.