[
https://issues.apache.org/jira/browse/KAFKA-14461?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Bruno Cadonna resolved KAFKA-14461.
-----------------------------------
Resolution: Fixed
> StoreQueryIntegrationTest#shouldQuerySpecificActivePartitionStores logic to
> check for active partitions seems brittle.
> ----------------------------------------------------------------------------------------------------------------------
>
> Key: KAFKA-14461
> URL: https://issues.apache.org/jira/browse/KAFKA-14461
> Project: Kafka
> Issue Type: Bug
> Components: streams, unit tests
> Reporter: Sagar Rao
> Assignee: Sagar Rao
> Priority: Major
>
> {noformat}
> StoreQueryIntegrationTest#shouldQuerySpecificActivePartitionStores {noformat}
> has a logic to figure out active partitions:
>
>
> {code:java}
> final boolean kafkaStreams1IsActive = (keyQueryMetadata.activeHost().port() %
> 2) == 1;{code}
>
>
> This is very brittle as when a new test gets added, this check would need to
> be changed to `==0`. It's a hassle to change it everytime with a new test
> added. Should look to improve this.
> Also, this test relies on junit4 annotations which can be migrated to Junit 5
> so that we can use @BeforeAll to set up and @AfterAll to shutdown the cluster
> instead of the current way where it's being done before/after every test.
>
--
This message was sent by Atlassian Jira
(v8.20.10#820010)