You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kafka.apache.org by ch...@apache.org on 2024/11/12 03:50:55 UTC

(kafka) branch trunk updated: MINOR: remove AlterUserScramCredentialsRequestTest.testAlterNotController (#17757)

This is an automated email from the ASF dual-hosted git repository.

chia7712 pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/kafka.git


The following commit(s) were added to refs/heads/trunk by this push:
     new 668299ebcbe MINOR: remove AlterUserScramCredentialsRequestTest.testAlterNotController (#17757)
668299ebcbe is described below

commit 668299ebcbe2671f625753ee2cb02644ab1f2779
Author: Colin Patrick McCabe <cm...@apache.org>
AuthorDate: Mon Nov 11 19:50:49 2024 -0800

    MINOR: remove AlterUserScramCredentialsRequestTest.testAlterNotController (#17757)
    
    Reviewers: Chia-Ping Tsai <ch...@gmail.com>
---
 .../server/AlterUserScramCredentialsRequestTest.scala     | 15 +--------------
 1 file changed, 1 insertion(+), 14 deletions(-)

diff --git a/core/src/test/scala/unit/kafka/server/AlterUserScramCredentialsRequestTest.scala b/core/src/test/scala/unit/kafka/server/AlterUserScramCredentialsRequestTest.scala
index 4797d849bea..ced78873510 100644
--- a/core/src/test/scala/unit/kafka/server/AlterUserScramCredentialsRequestTest.scala
+++ b/core/src/test/scala/unit/kafka/server/AlterUserScramCredentialsRequestTest.scala
@@ -34,7 +34,7 @@ import org.apache.kafka.common.security.authenticator.DefaultKafkaPrincipalBuild
 import org.apache.kafka.server.authorizer.{Action, AuthorizableRequestContext, AuthorizationResult}
 import org.apache.kafka.server.common.MetadataVersion
 import org.apache.kafka.server.config.ServerConfigs
-import org.junit.jupiter.api.{BeforeEach, Test, TestInfo}
+import org.junit.jupiter.api.{BeforeEach, TestInfo}
 import org.junit.jupiter.api.Assertions._
 import org.junit.jupiter.params.ParameterizedTest
 import org.junit.jupiter.params.provider.ValueSource
@@ -238,19 +238,6 @@ class AlterUserScramCredentialsRequestTest extends BaseRequestTest {
     checkAllErrorsAlteringCredentials(results, Errors.RESOURCE_NOT_FOUND, "when deleting a non-existing credential")
   }
 
-  @Test
-  def testAlterNotController(): Unit = {
-    val request = new AlterUserScramCredentialsRequest.Builder(
-      new AlterUserScramCredentialsRequestData()
-        .setDeletions(util.Arrays.asList(new AlterUserScramCredentialsRequestData.ScramCredentialDeletion().setName(user1).setMechanism(ScramMechanism.SCRAM_SHA_256.`type`)))
-        .setUpsertions(util.Arrays.asList(new AlterUserScramCredentialsRequestData.ScramCredentialUpsertion().setName(user2).setMechanism(ScramMechanism.SCRAM_SHA_512.`type`)))).build()
-    val response = sendAlterUserScramCredentialsRequest(request, notControllerSocketServer)
-
-    val results = response.data.results
-    assertEquals(2, results.size)
-    checkAllErrorsAlteringCredentials(results, Errors.NOT_CONTROLLER, "when routed incorrectly to a non-Controller broker")
-  }
-
   @ParameterizedTest
   @ValueSource(strings = Array("kraft"))
   def testAlterAndDescribe(quorum: String): Unit = {