You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by "Kirk True (Jira)" <ji...@apache.org> on 2023/10/05 22:14:00 UTC
[jira] [Updated] (KAFKA-15557) Fix duplicate metadata update in fetcher tests
[ https://issues.apache.org/jira/browse/KAFKA-15557?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Kirk True updated KAFKA-15557:
------------------------------
Issue Type: Test (was: Bug)
> Fix duplicate metadata update in fetcher tests
> ----------------------------------------------
>
> Key: KAFKA-15557
> URL: https://issues.apache.org/jira/browse/KAFKA-15557
> Project: Kafka
> Issue Type: Test
> Components: clients
> Reporter: Kirk True
> Assignee: Kirk True
> Priority: Minor
>
> The unit tests {{FetcherTest}} and {{FetchRequestManagerTest}} have methods named {{assignFromUser()}} and {{assignFromUserNoId()}} that appear to perform duplicate metadata updates:
> {code:java}
> private void assignFromUser(Set<TopicPartition> partitions) {
> subscriptions.assignFromUser(partitions);
> client.updateMetadata(initialUpdateResponse);
> // A dummy metadata update to ensure valid leader epoch.
> metadata.updateWithCurrentRequestVersion(
> RequestTestUtils.metadataUpdateWithIds(
> "dummy",
> 1,
> Collections.emptyMap(),
> singletonMap(topicName, 4),
> tp -> validLeaderEpoch, topicIds
> ),
> false,
> 0L
> );
> }
> {code}
> {{client.updateMetadata()}} eventually calls {{metadata.updateWithCurrentRequestVersion()}}. Determine why the test is updating the cluster metadata twice with different values.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)