[
https://issues.apache.org/jira/browse/HDFS-6470?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Ming Ma updated HDFS-6470:
--------------------------
Attachment: HDFS-6470.patch
It seems the test has the following issues.
1. It asserts the size of BPServiceActor is 2 after BPOfferService started. One
of the BPServiceActors could have shutdown due to initBlockPool failure by the
time the assert is called.
2. It assumes the first BPServiceActor is healthy and uses that for blockReport
verification. It is possible the second BPServiceActor is healthy.
The patch moves the size check before BPOfferService starts. In addition, as
long as one of the BPServiceActors can send blockReport, the test is considered
passed.
> TestBPOfferService.testBPInitErrorHandling is flaky
> ---------------------------------------------------
>
> Key: HDFS-6470
> URL: https://issues.apache.org/jira/browse/HDFS-6470
> Project: Hadoop HDFS
> Issue Type: Bug
> Affects Versions: 3.0.0
> Reporter: Andrew Wang
> Attachments: HDFS-6470.patch
>
>
> Saw some test flakage in a test-patch run, stacktrace:
> {code}
> java.lang.AssertionError: expected:<2> but was:<1>
> at org.junit.Assert.fail(Assert.java:88)
> at org.junit.Assert.failNotEquals(Assert.java:743)
> at org.junit.Assert.assertEquals(Assert.java:118)
> at org.junit.Assert.assertEquals(Assert.java:555)
> at org.junit.Assert.assertEquals(Assert.java:542)
> at
> org.apache.hadoop.hdfs.server.datanode.TestBPOfferService.testBPInitErrorHandling(TestBPOfferService.java:334)
> {code}
--
This message was sent by Atlassian JIRA
(v6.2#6252)