You are viewing a plain text version of this content. The canonical link for it is here.
Posted to oak-dev@jackrabbit.apache.org by "rishabhdaim (via GitHub)" <gi...@apache.org> on 2026/03/06 11:44:22 UTC
[PR] OAK-12129 : improve test coverage for ChangeProcessor stopAndWait behaviour [jackrabbit-oak]
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: oak-dev-unsubscribe@jackrabbit.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] OAK-12129 : improve test coverage for ChangeProcessor stopAndWait behaviour [jackrabbit-oak]
Posted by "rishabhdaim (via GitHub)" <gi...@apache.org>.
rishabhdaim merged PR #2785:
URL: https://github.com/apache/jackrabbit-oak/pull/2785
--
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: oak-dev-unsubscribe@jackrabbit.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] OAK-12129 : improve test coverage for ChangeProcessor stopAndWait behaviour [jackrabbit-oak]
Posted by "sonarqubecloud[bot] (via GitHub)" <gi...@apache.org>.
sonarqubecloud[bot] commented on PR #2785:
URL: https://github.com/apache/jackrabbit-oak/pull/2785#issuecomment-4011822964
## [](https://sonarcloud.io/dashboard?id=org.apache.jackrabbit%3Ajackrabbit-oak&pullRequest=2785) **Quality Gate passed**
Issues
 [3 New issues](https://sonarcloud.io/project/issues?id=org.apache.jackrabbit%3Ajackrabbit-oak&pullRequest=2785&issueStatuses=OPEN,CONFIRMED&sinceLeakPeriod=true)
 [0 Accepted issues](https://sonarcloud.io/project/issues?id=org.apache.jackrabbit%3Ajackrabbit-oak&pullRequest=2785&issueStatuses=ACCEPTED)
Measures
 [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=org.apache.jackrabbit%3Ajackrabbit-oak&pullRequest=2785&issueStatuses=OPEN,CONFIRMED&sinceLeakPeriod=true)
 [0.0% Coverage on New Code](https://sonarcloud.io/component_measures?id=org.apache.jackrabbit%3Ajackrabbit-oak&pullRequest=2785&metric=new_coverage&view=list)
 [0.0% Duplication on New Code](https://sonarcloud.io/component_measures?id=org.apache.jackrabbit%3Ajackrabbit-oak&pullRequest=2785&metric=new_duplicated_lines_density&view=list)
[See analysis details on SonarQube Cloud](https://sonarcloud.io/dashboard?id=org.apache.jackrabbit%3Ajackrabbit-oak&pullRequest=2785)
--
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: oak-dev-unsubscribe@jackrabbit.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org