Beispiel #1
0
  @Test
  public void testThrowException() throws Exception {
    EchoMessage message = EchoMessage.newBuilder().setMessage(MESSAGE).build();

    try {
      stub.throwException(null, message);
      fail("RpcCall should throw exception");
    } catch (TajoServiceException te) {
      assertEquals("Exception Test", te.getMessage());
      assertEquals("org.apache.tajo.rpc.test.DummyProtocol", te.getProtocol());
      assertEquals(
          server.getListenAddress().getAddress().getHostAddress()
              + ":"
              + server.getListenAddress().getPort(),
          te.getRemoteAddress());
    }
  }