mirror of https://github.com/apache/kafka.git
KAFKA-18441: Fix flaky KafkaAdminClientTest#testAdminClientApisAuthenticationFailure (#18735)
Reviewers: Lianet Magrans <lmagrans@confluent.io>, Chia-Ping Tsai <chia7712@gmail.com>, Andrew Schofield <aschofield@confluent.io>
This commit is contained in:
parent
617196c68e
commit
0dfc4017b8
|
@ -1788,7 +1788,10 @@ public class KafkaAdminClientTest {
|
|||
public void testAdminClientApisAuthenticationFailure() {
|
||||
Cluster cluster = mockBootstrapCluster();
|
||||
try (final AdminClientUnitTestEnv env = new AdminClientUnitTestEnv(Time.SYSTEM, cluster,
|
||||
newStrMap(AdminClientConfig.REQUEST_TIMEOUT_MS_CONFIG, "1000"))) {
|
||||
newStrMap(AdminClientConfig.REQUEST_TIMEOUT_MS_CONFIG, "1000",
|
||||
// Default "metadata.recovery.strategy" is rebootstrap. If it meets "retry.backoff.ms" (default is 100L),
|
||||
// following assertion will fail. Set it to none to avoid authentication error cleanup.
|
||||
AdminClientConfig.METADATA_RECOVERY_STRATEGY_CONFIG, "none"))) {
|
||||
env.kafkaClient().setNodeApiVersions(NodeApiVersions.create());
|
||||
env.kafkaClient().createPendingAuthenticationError(cluster.nodes().get(0),
|
||||
TimeUnit.DAYS.toMillis(1));
|
||||
|
|
Loading…
Reference in New Issue