use of org.elasticsearch.transport.TransportException in project crate by crate.
the class JoinHelperTests method testFailedJoinAttemptLogLevel.
public void testFailedJoinAttemptLogLevel() {
assertThat(JoinHelper.FailedJoinAttempt.getLogLevel(new TransportException("generic transport exception")), is(Level.INFO));
assertThat(JoinHelper.FailedJoinAttempt.getLogLevel(new RemoteTransportException("remote transport exception with generic cause", new Exception())), is(Level.INFO));
assertThat(JoinHelper.FailedJoinAttempt.getLogLevel(new RemoteTransportException("caused by CoordinationStateRejectedException", new CoordinationStateRejectedException("test"))), is(Level.DEBUG));
assertThat(JoinHelper.FailedJoinAttempt.getLogLevel(new RemoteTransportException("caused by FailedToCommitClusterStateException", new FailedToCommitClusterStateException("test"))), is(Level.DEBUG));
assertThat(JoinHelper.FailedJoinAttempt.getLogLevel(new RemoteTransportException("caused by NotMasterException", new NotMasterException("test"))), is(Level.DEBUG));
}
Aggregations