Uploaded image for project: 'Hadoop HDFS'
  1. Hadoop HDFS
  2. HDFS-10666 Über-jira: Unit tests should not use fixed sleep interval to wait for conditions
  3. HDFS-11178

TestAddStripedBlockInFBR#testAddBlockInFullBlockReport fails frequently in trunk

    XMLWordPrintableJSON

Details

    • Sub-task
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 3.0.0-alpha2
    • test
    • None
    • Reviewed

    Description

      The test TestAddStripedBlockInFBR#testAddBlockInFullBlockReport fails easily in trunk. It's easy to reproduce the failure, it fails 2~3 times when I run the test 4~-5 times in my local. Also it failed in the recent Jenkins(https://builds.apache.org/job/PreCommit-HDFS-Build/17667/testReport/), The stack infos:

      java.lang.AssertionError: expected:<9> but was:<7>
      	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.namenode.TestAddStripedBlockInFBR.testAddBlockInFullBlockReport(TestAddStripedBlockInFBR.java:108)
      

      It's easy to have a fix: Use GenericTestUtils.waitFor to wait the full blocks being reported.

      Attachments

        1. HDFS-11178.001.patch
          2 kB
          Yiqun Lin
        2. HDFS-11178.002.patch
          3 kB
          Yiqun Lin
        3. HDFS-11178.003.patch
          3 kB
          Yiqun Lin

        Activity

          People

            linyiqun Yiqun Lin
            linyiqun Yiqun Lin
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: