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
- links to