rishabhdaim opened a new pull request, #2785:
URL: https://github.com/apache/jackrabbit-oak/pull/2785

   ## Summary
   
   Extends `ChangeProcessorTest` with additional behavioural tests for 
`stopAndWait()`, covering scenarios introduced by the replacement of Guava's 
`Monitor` with `ReentrantLock` in OAK-12072.
   
   ## Changes
   
   - `ChangeProcessorTest.java` — added 4 new tests:
     - `testStopAndWaitReturnsTrueWhenNotContended` — verifies `stopAndWait()` 
succeeds and calls `unregister()` when no other thread holds the lock
     - `testStopAndWaitReturnsFalseOnTimeout` — verifies `stopAndWait()` 
returns `false` when a concurrent thread holds the running lock beyond the 
timeout
     - `testStopAndWaitReturnsTrueWhenAlreadyStopped` — verifies idempotency: 
already-stopped processor returns `true` without calling `unregister()` again
     - `testStopAndWaitSetsRunningToFalse` — verifies `toString()` reflects 
`running=false` after `stopAndWait()` completes
   - Removed `System.out.println` debug statements from existing tests
   - Fixed license header typo (`agreed in writing` → `agreed to in writing`)
   - Reordered imports alphabetically
   
   ## Test Plan
   
   - [ ] All existing `ChangeProcessorTest` tests pass
   - [ ] 4 new `stopAndWait` tests pass
   
   ## Links
   
   - JIRA: https://issues.apache.org/jira/browse/OAK-12129


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