Skip to content

Conversation

@lucliu1108
Copy link
Contributor

@lucliu1108 lucliu1108 commented Dec 11, 2025

Summary

  • Remove unstable.api.version.enable config since it's not required.
  • Remove
    testStreamsGroupHeartbeatIsInaccessibleWhenUnstableLatestVersionNotEnabled
    test

Reviewers: @lucasbru

@github-actions github-actions bot added triage PRs from the community core Kafka Broker tests Test fixes (including flaky tests) small Small PRs labels Dec 11, 2025
@lucasbru lucasbru requested a review from Copilot December 11, 2025 21:33
@lucasbru lucasbru self-assigned this Dec 11, 2025
@lucasbru lucasbru self-requested a review December 11, 2025 21:33
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR removes the unstable.api.versions.enable configuration setting from StreamsGroupHeartbeatRequestTest and eliminates the associated test testStreamsGroupHeartbeatIsInaccessibleWhenUnstableLatestVersionNotEnabled. The changes aim to simplify the test setup by removing a configuration deemed unnecessary for this specific test class.

Key Changes

  • Removed unstable.api.versions.enable configuration from the @ClusterTestDefaults serverProperties annotation
  • Removed test method testStreamsGroupHeartbeatIsInaccessibleWhenUnstableLatestVersionNotEnabled that verified behavior when the unstable API version config is disabled

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

new ClusterConfigProperty(key = GroupCoordinatorConfig.OFFSETS_TOPIC_REPLICATION_FACTOR_CONFIG, value = "1"),
new ClusterConfigProperty(key = "unstable.api.versions.enable", value = "true"),
new ClusterConfigProperty(key = "group.coordinator.rebalance.protocols", value = "classic,consumer,streams"),
new ClusterConfigProperty(key = "group.streams.initial.rebalance.delay.ms", value = "0")
Copy link

Copilot AI Dec 11, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The removal of unstable.api.versions.enable configuration from this test class may be premature. This configuration is still actively used in other test files including:

  • ApiVersionsRequestTest.scala (lines 32, 42, 72)
  • SaslApiVersionsRequestTest.scala (lines 45, 85)
  • DescribeFeaturesTest.java (lines 49, 54)
  • FeatureCommandTest.java (lines 134, 139)

The configuration constant is also still defined in ServerConfigs.java (line 115: UNSTABLE_API_VERSIONS_ENABLE_CONFIG).

Unless there's a specific reason why StreamsGroupHeartbeatRequestTest doesn't need this configuration while other API version tests do, this removal should be reconsidered or accompanied by a broader cleanup across all test files.

Suggested change
new ClusterConfigProperty(key = "group.streams.initial.rebalance.delay.ms", value = "0")
new ClusterConfigProperty(key = "group.streams.initial.rebalance.delay.ms", value = "0"),
new ClusterConfigProperty(key = "unstable.api.versions.enable", value = "true")

Copilot uses AI. Check for mistakes.
assertEquals(expectedResponse, streamsGroupHeartbeatResponse)
}

@ClusterTest
Copy link

Copilot AI Dec 11, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The removed test testStreamsGroupHeartbeatIsInaccessibleWhenUnstableLatestVersionNotEnabled was expecting Errors.NOT_COORDINATOR as the error code when the unstable API version is disabled. However, the other similar tests in this file that check for API inaccessibility (e.g., testStreamsGroupHeartbeatIsInaccessibleWhenDisabledByFeatureConfig and testStreamsGroupHeartbeatIsInaccessibleWhenDisabledByStaticGroupCoordinatorProtocolConfig) expect Errors.UNSUPPORTED_VERSION.

The mismatch in expected error codes suggests that either:

  1. The removed test had an incorrect expected error code and was not properly testing the intended behavior, or
  2. There was a distinct scenario being tested that is no longer covered after this removal

Please verify that removing this test doesn't eliminate coverage for a specific edge case or that the test was indeed incorrect and redundant.

Copilot uses AI. Check for mistakes.
@github-actions github-actions bot removed the triage PRs from the community label Dec 12, 2025
Copy link
Member

@chia7712 chia7712 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@lucliu1108 thanks for this clean-up. I have one minor question left

standbyTasks = List.empty,
warmupTasks = List.empty,
topology = topology,
expectedError = Errors.NOT_COORDINATOR
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This error appears to be caused by the non-existence of the offset topic. Perhaps we can keep the test, but rename it to reflect this specific scenario

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We could do that as well I guess

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

core Kafka Broker small Small PRs tests Test fixes (including flaky tests)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants