示例#1
0
 /**
  * Test method for {@link Monitor#getNodeInfo()}.
  *
  * @throws ConnectionException
  */
 @Test
 public final void testGetNodeInfo1() throws ConnectionException {
   final Monitor conn = new Monitor(scalarisNode);
   try {
     final GetNodeInfoResult nodeInfo = conn.getNodeInfo();
     assertTrue(nodeInfo.dhtNodes >= 0);
     assertTrue(!nodeInfo.scalarisVersion.isEmpty());
     assertTrue(!nodeInfo.erlangVersion.isEmpty());
   } finally {
     conn.closeConnection();
   }
 }
示例#2
0
 /**
  * Test method for {@link Monitor#getNodeInfo()} with a closed connection.
  *
  * @throws ConnectionException
  */
 @Test(expected = ConnectionException.class)
 public final void testGetNodeInfo_NotConnected() throws ConnectionException {
   final Monitor conn = new Monitor(scalarisNode);
   conn.closeConnection();
   conn.getNodeInfo();
 }