Example #1
0
  //    @Test
  public void testSentinel() {
    NodesGroup<Node> nodes = redisson.getNodesGroup();
    Assert.assertEquals(5, nodes.getNodes().size());

    for (Node node : nodes.getNodes()) {
      Assert.assertTrue(node.ping());
    }

    Assert.assertTrue(nodes.pingAll());
  }
Example #2
0
  //    @Test
  public void test() {
    NodesGroup<Node> nodes = redisson.getNodesGroup();
    Assert.assertEquals(1, nodes.getNodes().size());
    Iterator<Node> iter = nodes.getNodes().iterator();

    Node node1 = iter.next();
    Assert.assertTrue(node1.ping());

    Assert.assertTrue(nodes.pingAll());
  }