[ISSUE #9542, #9609] Fix bazel CI and reduce dependencies #9610
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 Issue(s) This PR Fixes
Fixes #9609, #9542, #9102
Brief Description
We fixed the Bazel CI.
We also identified several redundant/unused dependencies in Bazel build scripts.
java_language_version
andjava_runtime_version
along withlocal_java_repository
instead of the deprecated argumentsjavabase
, etc.-Dbuild.bazel=true
so that we can ignore test cases that cannot run in Bazel environment. E.g.,getResource().GetPath()
returns a path inside a JAR, which cannot be directly accessed. Seeclient/src/test/java/org/apache/rocketmq/acl/common/AclUtilsTest.java
.DoubleBraceInitialization
warnings to avoid compile errors.//client:src/test/java/org/apache/rocketmq/client/impl/mqclient/MQClientAPITest
//proxy:src/test/java/org/apache/rocketmq/proxy/service/cert/TlsCertificateManagerTest
//store:src/test/java/org/apache/rocketmq/store/dledger/DLedgerMultiPathTest
medium_tests
://store:src/test/java/org/apache/rocketmq/store/timer/TimerMessageStoreTest
Future Tasks
AclUtilsTest::testGetAclRPCHookByFileName
How Did You Test This Change?
Run bazel build and bazel test locally.
Also tested them in GitHub Actions (See https://github.com/xuhongxu96/rocketmq/actions/runs/16974096296).