Search in sources :

Example 1 with ActionTransportException

use of org.opensearch.transport.ActionTransportException in project OpenSearch by opensearch-project.

the class ExceptionSerializationTests method testActionTransportException.

public void testActionTransportException() throws IOException {
    TransportAddress transportAddress = buildNewFakeTransportAddress();
    ActionTransportException ex = serialize(new ActionTransportException("name?", transportAddress, "ACTION BABY!", "message?", null));
    assertEquals("ACTION BABY!", ex.action());
    assertEquals(transportAddress, ex.address());
    assertEquals("[name?][" + transportAddress.toString() + "][ACTION BABY!] message?", ex.getMessage());
}
Also used : TransportAddress(org.opensearch.common.transport.TransportAddress) ActionTransportException(org.opensearch.transport.ActionTransportException)

Aggregations

TransportAddress (org.opensearch.common.transport.TransportAddress)1 ActionTransportException (org.opensearch.transport.ActionTransportException)1