use of org.apache.kafka.common.network.ChannelState in project kafka by apache.
the class SaslAuthenticatorTest method createAndCheckSslAuthenticationFailure.
private void createAndCheckSslAuthenticationFailure(SecurityProtocol securityProtocol, String node) throws Exception {
ChannelState finalState = createAndCheckClientConnectionFailure(securityProtocol, node);
Exception exception = finalState.exception();
assertEquals(SslAuthenticationException.class, exception.getClass());
}
use of org.apache.kafka.common.network.ChannelState in project kafka by apache.
the class SaslAuthenticatorFailureDelayTest method createAndCheckClientConnectionFailure.
private ChannelState createAndCheckClientConnectionFailure(SecurityProtocol securityProtocol, String node) throws Exception {
createClientConnection(securityProtocol, node);
ChannelState finalState = NetworkTestUtils.waitForChannelClose(selector, node, ChannelState.State.AUTHENTICATION_FAILED);
selector.close();
selector = null;
return finalState;
}
use of org.apache.kafka.common.network.ChannelState in project kafka by apache.
the class MockSelector method serverAuthenticationFailed.
public void serverAuthenticationFailed(String id) {
ChannelState authFailed = new ChannelState(ChannelState.State.AUTHENTICATION_FAILED, new AuthenticationException("Authentication failed"), null);
this.disconnected.put(id, authFailed);
close(id);
}
Aggregations