jerryshao opened a new issue, #10728:
URL: https://github.com/apache/gravitino/issues/10728

   ## Version
   main branch
   
   ## Describe what's wrong
   The unit test 
`TestJobManager#testCleanUpStagingDirsDeletesDirectoryBeforeEntity` is failing 
in the CI build for the `:core:test` Gradle task, causing the `build (17)` job 
to fail.
   
   The test uses Mockito's `never()` verification wrapped in an Awaitility 
condition. The assertion expects `entityStore.delete()` to never be called at a 
certain point, but `JobManager.cleanUpStagingDirs` (JobManager.java:659) 
repeatedly invokes it, causing a `ConditionTimeoutException`.
   
   ## Error message and/or stacktrace
   ```
   TestJobManager > testCleanUpStagingDirsDeletesDirectoryBeforeEntity() FAILED
       org.awaitility.core.ConditionTimeoutException: Assertion condition 
defined as a 
       Lambda expression in org.apache.gravitino.job.TestJobManager 
       entityStore.delete(<any>, <any>);
       Never wanted here:
       -> at org.apache.gravitino.EntityStore.delete(EntityStore.java:209)
       But invoked here:
       -> at 
org.apache.gravitino.job.JobManager.lambda$cleanUpStagingDirs$22(JobManager.java:659)
 
          with arguments: [test_metalake.system.job.job-588845800033876441, JOB]
       (invoked multiple times)
   
   > Task :core:test FAILED
   BUILD FAILED in 23m 15s
   ```
   
   ## How to reproduce
   Run `:core:test` locally:
   ```
   ./gradlew :core:test --tests 
"org.apache.gravitino.job.TestJobManager.testCleanUpStagingDirsDeletesDirectoryBeforeEntity"
   ```
   
   ## Additional context
   - CI run: 
https://github.com/apache/gravitino/actions/runs/24136142428/job/70424762938
   - Failing task: `:core:test` (1595 tests completed, 1 failed)
   - This may be a flaky test related to timing/race conditions in 
`JobManager.cleanUpStagingDirs`


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