Uploaded image for project: 'Apache Ozone'
  1. Apache Ozone
  2. HDDS-2926

Intermittent failure in TestRecon due to thread timing

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • None
    • 0.5.0
    • test
    • None

    Description

      TestRecon uses Thread#sleep to wait for async task (OM snapshot fetch from Recon) completion. This can result in failure in case of bad timing:

      2020-01-22T07:28:21.5231608Z [ERROR] Tests run: 1, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 45.857 s <<< FAILURE! - in org.apache.hadoop.ozone.recon.TestRecon
      2020-01-22T07:28:21.5236225Z [ERROR] testReconServer(org.apache.hadoop.ozone.recon.TestRecon)  Time elapsed: 10.269 s  <<< FAILURE!
      2020-01-22T07:28:21.5237314Z java.lang.AssertionError: expected:<1> but was:<0>
      ...
      2020-01-22T07:28:21.5241907Z 	at org.apache.hadoop.ozone.recon.TestRecon.testReconServer(TestRecon.java:205)
      

      GenericTestUtils#waitFor or similar solution should be preferred.

      Attachments

        Issue Links

          Activity

            People

              swagle Siddharth Wagle
              adoroszlai Attila Doroszlai
              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 - 20m
                  20m