chia7712 commented on a change in pull request #10446: URL: https://github.com/apache/kafka/pull/10446#discussion_r623905395
########## File path: core/src/test/scala/unit/kafka/admin/ConfigCommandTest.scala ########## @@ -803,7 +803,14 @@ class ConfigCommandTest extends ZooKeeperTestHarness with Logging { new AlterConfigOp(newConfigEntry("min.insync.replicas", "2"), AlterConfigOp.OpType.SET), new AlterConfigOp(newConfigEntry("unclean.leader.election.enable", ""), AlterConfigOp.OpType.DELETE) ) - assertEquals(expectedConfigOps, alterConfigOps.asScala.toSet) + assertEquals(expectedConfigOps.size, alterConfigOps.size()) + expectedConfigOps.foreach { expectedOp => + val actual = alterConfigOps.asScala.find(_.configEntry().name() == expectedOp.configEntry().name()) + assertNotEquals(actual, None) + assertEquals(expectedOp.opType, actual.get.opType) + assertEquals(expectedOp.configEntry.name, actual.get.configEntry.name) + assertEquals(expectedOp.configEntry.value, actual.get.configEntry.value) + } Review comment: The arguments used to create `expectedConfigOps` consists of only `opType`, `configEntry.name` and `configEntry.value`. The test was passed since the `equals` function did not compare all fields. This change keep same behavior as before. -- 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