rondagostino commented on a change in pull request #9032:
URL: https://github.com/apache/kafka/pull/9032#discussion_r480370463



##########
File path: 
core/src/test/scala/integration/kafka/api/SaslClientsWithInvalidCredentialsTest.scala
##########
@@ -248,4 +250,25 @@ class SaslClientsWithInvalidCredentialsTest extends 
IntegrationTestHarness with
     producerConfig.put(ProducerConfig.ENABLE_IDEMPOTENCE_CONFIG, "true")
     createProducer()
   }
+
+  private def createScramAdminClient(user: String, password: String): Admin = {

Review comment:
       Ok, I added the following code to SaslSetup, and we implement that first 
method in the 3 test classes that use this functionality.
   
   ```
     def createPrivilegedAdminClient(): Admin = {
       // create an admin client instance that is authorized to create 
credentials
       throw new UnsupportedOperationException("Must implement this if a test 
needs to use it")
     }
   
     def createScramCredentialsViaPrivilegedAdminClient(userName: String, 
password: String): Unit = {
       val privilegedAdminClient = createPrivilegedAdminClient() // must 
explicitly implement this method
       try {
         // create the SCRAM credential for the given user
         createScramCredentials(privilegedAdminClient, userName, password)
       } finally {
         privilegedAdminClient.close()
       }
     }
   ```




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to