junrao commented on a change in pull request #9353:
URL: https://github.com/apache/kafka/pull/9353#discussion_r504239853
##########
File path:
core/src/test/scala/integration/kafka/admin/ReassignPartitionsIntegrationTest.scala
##########
@@ -60,13 +57,53 @@ class ReassignPartitionsIntegrationTest extends
ZooKeeperTestHarness {
brokerId -> brokerLevelThrottles.map(throttle => (throttle, -1L)).toMap
}.toMap
- /**
- * Test running a quick reassignment.
- */
+
@Test
def testReassignment(): Unit = {
cluster = new ReassignPartitionsTestCluster(zkConnect)
cluster.setup()
+ executeAndVerifyReassignment()
+ }
+
+ @Test
+ def testReassignmentWithAlterIsrDisabled(): Unit = {
+ // Test reassignment when the IBP is on an older version which does not use
+ // the `AlterIsr` API. In this case, the controller will register
individual
+ // watches for each reassigning partition so that the reassignment can be
+ // completed as soon as the ISR is expanded.
+ val configOverrides = Map(KafkaConfig.InterBrokerProtocolVersionProp ->
KAFKA_2_7_IV1.version)
+ cluster = new ReassignPartitionsTestCluster(zkConnect, configOverrides =
configOverrides)
+ cluster.setup()
+ executeAndVerifyReassignment()
+ }
+
+ @Test
+ def testReassignmentCompletionDuringPartialUpgrade(): Unit = {
+ // Test reassignment during a partial upgrade when some brokers are
relying on
+ // `AlterIsr` and some on rely on the old notification logic through
Zookeeper.
Review comment:
typo "some on"
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]