Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions core/src/test/scala/unit/kafka/admin/DeleteTopicTest.scala
Original file line number Diff line number Diff line change
Expand Up @@ -138,8 +138,11 @@ class DeleteTopicTest extends ZooKeeperTestHarness {
}, "Partition reassignment shouldn't complete.")
val controllerId = zkClient.getControllerId.getOrElse(fail("Controller doesn't exist"))
val controller = servers.filter(s => s.config.brokerId == controllerId).head
assertFalse("Partition reassignment should fail",
controller.kafkaController.controllerContext.partitionsBeingReassigned.contains(topicPartition))

// partitionsBeingReassigned is updated after re-assignment znode is removed, so wait again
TestUtils.waitUntilTrue(() => {
!controller.kafkaController.controllerContext.partitionsBeingReassigned.contains(topicPartition)
}, "Partition should be removed from partitionsBeingReassigned.")
val assignedReplicas = zkClient.getReplicasForPartition(new TopicPartition(topic, 0))
assertEquals("Partition should not be reassigned to 0, 1, 2", oldAssignedReplicas, assignedReplicas)
follower.startup()
Expand Down