AndrewJSchofield commented on code in PR #17046:
URL: https://github.com/apache/kafka/pull/17046#discussion_r1752678715
##########
core/src/test/java/kafka/admin/ConfigCommandIntegrationTest.java:
##########
@@ -589,6 +658,16 @@ private void verifyGroupConfig(Admin client, String
groupName, Map<String, Strin
}, 10000, config + " are not updated");
}
+ private void verifyClientMetricsConfig(Admin client, String
clientMetricsName, Map<String, String> config) throws Exception {
+ ConfigResource configResource = new
ConfigResource(ConfigResource.Type.CLIENT_METRICS, clientMetricsName);
+ TestUtils.waitForCondition(() -> {
+ Map<String, String> current = getConfigEntryStream(client,
configResource)
+ .filter(configEntry ->
Objects.nonNull(configEntry.value()))
+ .collect(Collectors.toMap(ConfigEntry::name,
ConfigEntry::value));
+ return config.entrySet().stream().allMatch(e ->
e.getValue().equals(current.get(e.getKey())));
Review Comment:
I don't quite understand. It is true that `allMatch` is "vacuously" true
when stream is empty, but in some cases the `config` parameter is not empty.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]