diff --git a/tests/kafkatest/tests/core/security_test.py b/tests/kafkatest/tests/core/security_test.py index 8dcc264d831c0..e93a6160b1a91 100644 --- a/tests/kafkatest/tests/core/security_test.py +++ b/tests/kafkatest/tests/core/security_test.py @@ -65,7 +65,7 @@ def test_client_ssl_endpoint_validation_failure(self, security_protocol, interbr Test that invalid hostname in certificate results in connection failures. When security_protocol=SSL, client SSL handshakes are expected to fail due to hostname verification failure. When security_protocol=PLAINTEXT and interbroker_security_protocol=SSL, controller connections fail - with hostname verification failure. Hence clients are expected to fail with LEADER_NOT_AVAILABLE. + with hostname verification failure. Hence clients are expected to fail with INVALID_REPLICATION_FACTOR. """ # Start Kafka with valid hostnames in the certs' SANs so that we can create the test topic via the admin client @@ -97,7 +97,7 @@ def test_client_ssl_endpoint_validation_failure(self, security_protocol, interbr # expected pass - error = 'SSLHandshakeException' if security_protocol == 'SSL' else 'LEADER_NOT_AVAILABLE' + error = 'SSLHandshakeException' if security_protocol == 'SSL' else 'INVALID_REPLICATION_FACTOR' wait_until(lambda: self.producer_consumer_have_expected_error(error), timeout_sec=30) self.producer.stop() self.consumer.stop()