smjn commented on code in PR #18521: URL: https://github.com/apache/kafka/pull/18521#discussion_r1914748449
########## core/src/test/java/kafka/test/api/ShareConsumerTest.java: ########## @@ -1922,6 +1930,40 @@ private void warmup() throws InterruptedException { } } + private void maybeVerifyShareGroupStateTopicRecordCount(String persister, int messageCount) { + if (!persister.equals(DEFAULT_STATE_PERSISTER)) { + return; + } + try { + TestUtils.waitForCondition(() -> + !cluster.brokers().get(0).metadataCache().getAliveBrokerNodes(new ListenerName("EXTERNAL")).isEmpty(), + DEFAULT_MAX_WAIT_MS, 100L, () -> "cache not up yet"); + Map<String, Object> consumerConfigs = new HashMap<>(); + consumerConfigs.put(ConsumerConfig.BOOTSTRAP_SERVERS_CONFIG, cluster.bootstrapServers()); + consumerConfigs.put(ConsumerConfig.GROUP_ID_CONFIG, UUID.randomUUID().toString()); Review Comment: Perhaps but since the pattern is same as existing tests. This addition should not decrease reliability. -- 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