Russole commented on code in PR #10452:
URL: https://github.com/apache/ozone/pull/10452#discussion_r3369040210
##########
hadoop-ozone/recon/src/test/java/org/apache/hadoop/ozone/recon/tasks/TestReconTaskControllerImpl.java:
##########
@@ -236,9 +246,17 @@ public void testFailedTaskRetryLogic() throws Exception {
reconTaskController.consumeOMEvents(omUpdateEventBatchMock,
mock(OMMetadataManager.class));
- // Wait for async processing to complete
- Thread.sleep(3000); // Increase timeout for retry logic
-
+ GenericTestUtils.waitFor(() -> {
+ try {
+ ReconTaskStatus status = reconTaskStatusDao.findById(taskName);
+ return status != null
+ && status.getLastTaskRunStatus() == 0
+ && status.getLastUpdatedSeqNumber() == 100L;
+ } catch (Exception e) {
+ return false;
+ }
+ }, 100, 5000);
Review Comment:
Thanks for pointing this out. I agree a helper could clean this up, but I’ll
keep it as-is for this patch since the duplication is small and the current
form keeps the wait condition explicit.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]