Skip to content

Commit

Permalink
MINOR: Fix failing test due to KAFKA-10556 PR (apache#9372)
Browse files Browse the repository at this point in the history
Reviewers: Chia-Ping Tsai <[email protected]>, Rajini Sivaram <[email protected]>
  • Loading branch information
rondagostino authored and javierfreire committed Oct 8, 2020
1 parent 098d468 commit a4af57f
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions core/src/test/scala/integration/kafka/api/MetricsTest.scala
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ import org.apache.kafka.common.config.SaslConfigs
import org.apache.kafka.common.errors.InvalidTopicException
import org.apache.kafka.common.network.ListenerName
import org.apache.kafka.common.security.auth.SecurityProtocol
import org.apache.kafka.common.security.authenticator.TestJaasConfig
import org.junit.{After, Before, Test}
import org.junit.Assert._
import org.scalatest.Assertions.fail
Expand Down Expand Up @@ -113,8 +114,8 @@ class MetricsTest extends IntegrationTestHarness with SaslSetup {
// Create a producer that fails authentication to verify authentication failure metrics
private def generateAuthenticationFailure(tp: TopicPartition): Unit = {
val saslProps = new Properties()
// Temporary limit to reduce blocking before KIP-152 client-side changes are merged
saslProps.put(SaslConfigs.SASL_MECHANISM, "SCRAM-SHA-256")
saslProps.put(SaslConfigs.SASL_MECHANISM, kafkaClientSaslMechanism)
saslProps.put(SaslConfigs.SASL_JAAS_CONFIG, TestJaasConfig.jaasConfigProperty(kafkaClientSaslMechanism, "badUser", "badPass"))
// Use acks=0 to verify error metric when connection is closed without a response
val producer = TestUtils.createProducer(brokerList,
acks = 0,
Expand Down

0 comments on commit a4af57f

Please sign in to comment.