Skip to content

[ISSUE #10410] Fix RocksDBOptionsFactoryTest compile failure#10411

Merged
lizhimins merged 3 commits into
developfrom
codex/fix-rocksdb-options-test
Jun 1, 2026
Merged

[ISSUE #10410] Fix RocksDBOptionsFactoryTest compile failure#10411
lizhimins merged 3 commits into
developfrom
codex/fix-rocksdb-options-test

Conversation

@RongtongJin
Copy link
Copy Markdown
Contributor

@RongtongJin RongtongJin commented Jun 1, 2026

Which Issue(s) This PR Fixes

Fixes #10410
Fixes #10412
Fixes #10413

Brief Description

RocksDBOptionsFactoryTest referenced a non-existent ConsumeQueueCompactionFilterFactory and called a non-existent overload of RocksDBOptionsFactory.createCQCFOptions, causing rocketmq-store test compilation to fail. This PR updates the test to call the current createCQCFOptions(MessageStore) API directly.

It also stabilizes BrokerOuterAPITest.testPullMessageFromSpecificBrokerAsync_brokerReturn_pullStatusCode by mocking the invokeAsync callback directly for each broker response code. The previous test reused a completed Netty DefaultChannelPromise and repeatedly re-stubbed the same spy in a loop, making it sensitive to listener scheduling on macOS CI.

Finally, it stabilizes DefaultLitePullConsumerTest.testSubscribe_BroadcastPollMessageSuccess by stubbing the injected MQClientAPIImpl mock directly and avoiding spy calls while preparing Mockito stubs.

How Did You Test This Change?

  • git diff --check
  • mvn -pl store -am -DskipTests test-compile
  • mvn -pl common,remoting,store -Dtest=org.apache.rocketmq.store.rocksdb.RocksDBOptionsFactoryTest -Dsurefire.failIfNoSpecifiedTests=false test
  • mvn -pl broker -am -DskipTests test-compile
  • mvn -pl broker -am -Djacoco.skip=true -DargLine='--add-exports=java.xml/jdk.xml.internal=ALL-UNNAMED' -Dtest=org.apache.rocketmq.broker.BrokerOuterAPITest#testPullMessageFromSpecificBrokerAsync_brokerReturn_pullStatusCode -Dsurefire.failIfNoSpecifiedTests=false test
  • mvn -pl client -am -Djacoco.skip=true -Dtest=org.apache.rocketmq.client.consumer.DefaultLitePullConsumerTest#testSubscribe_BroadcastPollMessageSuccess -Dsurefire.failIfNoSpecifiedTests=false test
  • mvn -pl client -am -Djacoco.skip=true -Dtest=org.apache.rocketmq.client.consumer.DefaultLitePullConsumerTest -Dsurefire.failIfNoSpecifiedTests=false test

@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented Jun 1, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 47.93%. Comparing base (a705dbc) to head (2a22056).
⚠️ Report is 3 commits behind head on develop.

Additional details and impacted files
@@              Coverage Diff              @@
##             develop   #10411      +/-   ##
=============================================
- Coverage      48.03%   47.93%   -0.10%     
+ Complexity     13284    13252      -32     
=============================================
  Files           1376     1376              
  Lines         100536   100558      +22     
  Branches       12983    12985       +2     
=============================================
- Hits           48292    48203      -89     
- Misses         46326    46411      +85     
- Partials        5918     5944      +26     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@lizhimins lizhimins merged commit a6fb9e2 into develop Jun 1, 2026
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

3 participants