Search in sources :

Example 1 with ActionTransportException

use of org.elasticsearch.transport.ActionTransportException in project elasticsearch by elastic.

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.elasticsearch.common.transport.TransportAddress) ActionTransportException(org.elasticsearch.transport.ActionTransportException)

Aggregations

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