Repository navigation
fix(build): add --add-opens JVM args to test task - #296
Merged
vladimir-gavrilenko merged 1 commit intoOct 16, 2026
Merged
vladimir-gavrilenko merged 1 commit into
vladimir-gavrilenko merged 1 commit into
Conversation
vladimir-gavrilenko
force-pushed
the
fix/gradle-test-add-opens
branch
from
October 15, 2026 14:42
fb91e16 to
e2cb055
Compare
**Which sample(s) or area?**
Build (build.gradle)
**What changed?**
- Added the `--add-opens` JVM args to the `test` task.
- Extracted the args shared by `execute` and `test` into `addOpensArgs`.
**Why?**
On JDK 17 `./gradlew build` failed in `:test` with
InaccessibleObjectException (the Cadence client reflects into java.base)
and the test run then hung. The `execute` task already had these flags.
**How did you test it?**
- `./gradlew build` on JDK 17: BUILD SUCCESSFUL.
- Manual run, following the README:
1. Start Cadence Server (compose file from the README):
`docker-compose up`
2. Register the domain. This is required once: without it the sample
fails with `Domain samples-domain does not exist`:
`./gradlew -q execute -PmainClass=com.uber.cadence.samples.common.RegisterDomain`
3. Run the sample, which prints `Hello World!`:
`./gradlew -q execute -PmainClass=com.uber.cadence.samples.hello.HelloActivity`
**Potential risks**
None expected; the flags only affect the test JVM.
**Release notes**
N/A
**Documentation Changes**
N/A
Signed-off-by: vladimirg <vladi.a.gavri@gmail.com>
vladimir-gavrilenko
force-pushed
the
fix/gradle-test-add-opens
branch
from
October 15, 2026 14:43
e2cb055 to
7db6453
Compare
Code Review ✅ Approved🟡 Medium risk · Adding Java module --add-opens flags to the test JVM permits deeper reflective access, potentially masking encapsulation issues or changing test behavior. Adds the Verification Rules 1/1 metFunctional validation No results Rules 1 passed
For more verification details, comment OptionsAuto-apply is off → Gitar will not commit updates to this branch. Comment with these commands to change the behavior for this request:
Was this helpful? React with 👍 / 👎 | Gitar |
bowenxia
approved these changes
Oct 15, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Which sample(s) or area?
Build (build.gradle)
What changed?
--add-opensJVM args to thetesttask.executeandtestintoaddOpensArgs.Why?
On JDK 17
./gradlew buildfailed in:testwith InaccessibleObjectException (the Cadence client reflects into java.base) and the test run then hung. Theexecutetask already had these flags.How did you test it?
./gradlew buildon JDK 17: BUILD SUCCESSFUL.docker-compose upDomain samples-domain does not exist:./gradlew -q execute -PmainClass=com.uber.cadence.samples.common.RegisterDomainHello World!:./gradlew -q execute -PmainClass=com.uber.cadence.samples.hello.HelloActivityPotential risks
None expected; the flags only affect the test JVM.
Release notes
N/A
Documentation Changes
N/A