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

Make possible to explain why HBaseTestingUtility.waitFor fails

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 1.0.0, 2.0.0
    • 1.1.0, 2.0.0
    • test
    • None
    • Reviewed

    Description

      HBaseTestingUtility has good methods for waiting conditions, but with one drawback, when waitfor fails, there is no way to explain what happened (fail() called from internals and that is not very easy to intercept and explain state of failure).

      That would be great to have enhanced Predicate which can explain state after it failed to wait for.

      That can looks like

      HBaseTestingUtility.waitFor(10000, new ExplainingPredicate() {
         boolean evaluate() {
           ... some evaluation code
         }
         String explain() {
          ... generate brief explanation of what to be expected, but not happened
         }
      }
      

      Attachments

        1. HBASE-13004.patch
          19 kB
          Andrey Stepachev
        2. HBASE-13004.patch
          19 kB
          Andrey Stepachev
        3. HBASE-13004-branch-1.patch
          15 kB
          Andrey Stepachev
        4. HBASE-13004-branch-1.patch
          15 kB
          Andrey Stepachev
        5. master-addendum.patch
          1 kB
          Andrey Stepachev

        Activity

          People

            octo47 Andrey Stepachev
            octo47 Andrey Stepachev
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: