[ 
https://issues.apache.org/jira/browse/KAFKA-10158?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17147895#comment-17147895
 ] 

Chia-Ping Tsai commented on KAFKA-10158:
----------------------------------------

[~lucasbradstreet] not sure whether I have caught you point. It seems to me the 
issue you described is that the throttle does not work expectedly and so the 
following check gets failed, right?

{code}
    // let's wait until the LAIR is propagated
    TestUtils.waitUntilTrue(() => {
      val reassignments = 
adminClient.listPartitionReassignments(Collections.singleton(tp)).reassignments().get()
      !reassignments.get(tp).addingReplicas().isEmpty
    }, "Reassignment didn't add the second node")

    // describe the topic and test if it's under-replicated
    val simpleDescribeOutput = TestUtils.grabConsoleOutput(
      topicService.describeTopic(new TopicCommandOptions(Array("--topic", 
testTopicName))))
    val simpleDescribeOutputRows = simpleDescribeOutput.split("\n")
    assertTrue(simpleDescribeOutputRows(0).startsWith(s"Topic: $testTopicName"))
    assertEquals(2, simpleDescribeOutputRows.size)
{code}

> Fix flaky 
> kafka.admin.TopicCommandWithAdminClientTest#testDescribeUnderReplicatedPartitionsWhenReassignmentIsInProgress
> -----------------------------------------------------------------------------------------------------------------------
>
>                 Key: KAFKA-10158
>                 URL: https://issues.apache.org/jira/browse/KAFKA-10158
>             Project: Kafka
>          Issue Type: Bug
>          Components: unit tests
>            Reporter: Chia-Ping Tsai
>            Assignee: Chia-Ping Tsai
>            Priority: Minor
>             Fix For: 2.7.0
>
>
> Altering the assignments is a async request so it is possible that the 
> reassignment is still in progress when we start to verify the 
> "under-replicated-partitions". In order to make it stable, it needs a wait 
> for the reassignment completion before verifying the topic command with 
> "under-replicated-partitions".



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to