chia7712 commented on code in PR #16317: URL: https://github.com/apache/kafka/pull/16317#discussion_r1639281603
########## core/src/test/java/kafka/admin/ConfigCommandIntegrationTest.java: ########## @@ -515,14 +524,19 @@ private void deleteAndVerifyConfig(Admin client, Optional<String> brokerId, Set< } private void verifyConfigDefaultValue(Admin client, Optional<String> brokerId, Set<String> config) throws Exception { - ConfigResource configResource = new ConfigResource(ConfigResource.Type.BROKER, brokerId.orElse(defaultBrokerId)); + ConfigResource configResource = new ConfigResource(ConfigResource.Type.BROKER, brokerId.orElse("")); + TestUtils.waitForCondition(() -> { + Map<String, String> current = getConfigEntryStream(client, configResource) + .filter(configEntry -> Objects.nonNull(configEntry.value())) + .collect(Collectors.toMap(ConfigEntry::name, ConfigEntry::value)); + return config.stream().allMatch(current::containsKey); + }, 5000, config + " are not updated"); + } + + private void verifyConfigSecretValue(Admin client, Optional<String> brokerId, Set<String> config) throws Exception { + ConfigResource configResource = new ConfigResource(ConfigResource.Type.BROKER, brokerId.orElse("")); TestUtils.waitForCondition(() -> { - Map<String, String> current = client.describeConfigs(singletonList(configResource)) - .all() - .get() - .values() - .stream() - .flatMap(e -> e.entries().stream()) + Map<String, String> current = getConfigEntryStream(client, configResource) Review Comment: we should use `ConfigEntry::isSensitive` to get expected keys -- 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. To unsubscribe, e-mail: jira-unsubscr...@kafka.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org