Uploaded image for project: 'Hive'
  1. Hive
  2. HIVE-26500

Improve TestHiveMetastore

Log workAgile BoardRank to TopRank to BottomBulk Copy AttachmentsBulk Move AttachmentsVotersWatch issueWatchersCreate sub-taskConvert to sub-taskMoveLinkCloneLabelsUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    Description

          Thread.sleep(5 * 1000); // give HMS time to handle close request
          int numObjectsAfterClose =  getJDOPersistanceManagerCacheSize();
          assertTrue(numObjectsBeforeClose == numObjectsAfterClose);
      

      1. easy fix: assertTrue(numObjectsBeforeClose == numObjectsAfterClose);
      this tells nothing in case of assertionerror:

      java.lang.AssertionError
      	at org.junit.Assert.fail(Assert.java:87)
      	at org.junit.Assert.assertTrue(Assert.java:42)
      	at org.junit.Assert.assertTrue(Assert.java:53)
      	at org.apache.hadoop.hive.metastore.TestHiveMetaStore.testJDOPersistanceManagerCleanup(TestHiveMetaStore.java:3298)
      

      should tell a more informative message with particular values

      2. harder fix, maybe do it later

      Thread.sleep(5 * 1000); // give HMS time to handle close request
      

      sleep is always dangerous, cannot make sure it handled everything that we expected

      Attachments

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            abstractdog László Bodor Assign to me
            abstractdog László Bodor
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

              Estimated:
              Original Estimate - Not Specified
              Not Specified
              Remaining:
              Remaining Estimate - 0h
              0h
              Logged:
              Time Spent - 2h 10m
              2h 10m

              Slack

                Issue deployment