mjsax commented on code in PR #18988: URL: https://github.com/apache/kafka/pull/18988#discussion_r1964730450
########## streams/src/test/java/org/apache/kafka/streams/processor/internals/assignment/AssignorConfigurationTest.java: ########## @@ -54,30 +54,25 @@ public void configsShouldRejectZeroWarmups() { } @Test - public void rebalanceProtocolShouldSupportAllUpgradeFromVersions() { + public void shouldSupportAllUpgradeFromVersionsFromCooperativeRebalancingOn() { + boolean beforeCooperative = true; for (final UpgradeFromValues upgradeFrom : UpgradeFromValues.values()) { - config.put(StreamsConfig.UPGRADE_FROM_CONFIG, upgradeFrom.toString()); - final AssignorConfiguration assignorConfiguration = new AssignorConfiguration(config); - - try { - assignorConfiguration.rebalanceProtocol(); - } catch (final Exception error) { - throw new AssertionError("Upgrade from " + upgradeFrom + " failed with " + error.getMessage() + "!"); + if (upgradeFrom.toString().equals("2.4")) { + beforeCooperative = false; } - } - } - @Test - public void configuredMetadataVersionShouldSupportAllUpgradeFromVersions() { - for (final UpgradeFromValues upgradeFrom : UpgradeFromValues.values()) { config.put(StreamsConfig.UPGRADE_FROM_CONFIG, upgradeFrom.toString()); - final AssignorConfiguration assignorConfiguration = new AssignorConfiguration(config); - try { - assignorConfiguration.configuredMetadataVersion(0); - } catch (final Exception error) { - throw new AssertionError("Upgrade from " + upgradeFrom + " failed with " + error.getMessage() + "!"); + if (beforeCooperative) { + assertThrows(IllegalStateException.class, () -> new AssignorConfiguration(config)); + } else { + try { + final AssignorConfiguration assignorConfiguration = new AssignorConfiguration(config); + } catch (final Exception error) { + throw new AssertionError("Upgrade from " + upgradeFrom + " failed with " + error.getMessage() + "!"); Review Comment: _disappearing_ -- 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