Пример #1
0
 /**
  * Test method for {@link Monitor#getServiceInfo()}.
  *
  * @throws ConnectionException
  */
 @Test
 public final void testGetServiceInfo1() throws ConnectionException {
   final Monitor conn = new Monitor(scalarisNode);
   try {
     final GetServiceInfoResult serviceInfo = conn.getServiceInfo();
     assertTrue(serviceInfo.nodes >= 0);
     assertTrue(serviceInfo.totalLoad >= 0);
   } finally {
     conn.closeConnection();
   }
 }
Пример #2
0
 /**
  * Test method for {@link Monitor#getServiceInfo()} with a closed connection.
  *
  * @throws ConnectionException
  */
 @Test(expected = ConnectionException.class)
 public final void testGetServiceInfo_NotConnected() throws ConnectionException {
   final Monitor conn = new Monitor(scalarisNode);
   conn.closeConnection();
   conn.getServiceInfo();
 }