Uploaded image for project: 'HBase'
  1. HBase
  2. HBASE-9146

TestHTablePool hangs when run as part of runMediumTests profile

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 0.98.0, 0.95.2, 0.94.11
    • Component/s: test
    • Labels:
    • Hadoop Flags:
      Reviewed

      Description

      In the medium set, we found a test -'TestHTablePool.java' hanging and the build fails reporting a timeout. Though the test passes when run separately, while running the whole suite using the command " mvn -U clean package -Dhadoop.profile=2.0 -Psecurity -Dsnappy -P runMediumTests", this test is observed in a waiting state, tracking for the root region server.

      It turns out be a problem with the test initialization. The class TestHTable​Pool contains a class TestHTable​PoolType which uses nested static test classes. But the initializati​on is being done for the outer class - TestHTable​Pool using @BeforeClass annotation. Surefire reruns the tests written in nested manner (for some reasons), and when this test is instantiated the second time, the method setUpBefore​Class() is not being called and hence the initializati​on is not done.

      Guess that surefire tries to run TestHTable​Pool.​TestHTable​ReusablePool.​class directly. (Tried this by writing a separate program using JUnitCore.​runClasses(​TTestHTable​Pool.​TestHTable​ReusablePool.​class) and observed that the outer class's @BeforeClass method is not called.)

        Attachments

        1. TestHTablePool.java.patch
          1 kB
          Rajesh Venkatachalam
        2. Waiting threads (TestHTablePool) - HBase medium tests
          23 kB
          Rajesh Venkatachalam

          Activity

            People

            • Assignee:
              rvenkatachalam Rajesh Venkatachalam
              Reporter:
              rvenkatachalam Rajesh Venkatachalam
            • Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: