johntomcat7408-cmyk opened a new pull request, #4307:
URL: https://github.com/apache/amoro/pull/4307

   ## Why are the changes needed?
   
   Close #4303.
   
   `AMSServiceTestBase` applied an 800 ms optimizer heartbeat timeout to every 
optimizer test, while its background toucher only attempted a heartbeat every 
300 ms. Under CI scheduling or database delays, tests that were not exercising 
expiration could lose the optimizer, requeue its task, and fail 
nondeterministically.
   
   ## Brief change log
   
   - Use a 10-second heartbeat timeout for ordinary optimizer tests while 
retaining an explicit 800 ms timeout in expiration-specific tests.
   - Touch every 100 ms and replace fixed sleeps with condition-based waits for 
task and optimizer state transitions.
   - Fully dispose and restore test services around custom-timeout scenarios so 
background keepers cannot leak between tests.
   - Ignore keeper failures only after shutdown has begun, while preserving 
runtime error logging.
   
   ## How was this patch tested?
   
   - [x] Update the existing optimizer service tests to cover normal and 
expiration-specific timing independently.
   - [ ] Add screenshots for manual tests if appropriate (not applicable).
   - [x] Run tests locally before making a pull request.
   
   Validation performed against commit 
`7efadacadc3561b60ec7c10cc28e91964c29e5a8`:
   
   - JDK 11: full `TestDefaultOptimizingService` suite (22 tests) passed, 
followed by 20/20 successful repetitions of `testPollTaskThreeTimes`.
   - JDK 17: full `TestDefaultOptimizingService` suite (22 tests) passed, 
followed by 20/20 successful repetitions of `testPollTaskThreeTimes`.
   - Spotless, Checkstyle, production compilation, and test compilation passed.
   
   ## Documentation
   
   - Does this pull request introduce a new feature? no
   - If yes, how is the feature documented? not applicable
   


-- 
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]

Reply via email to