Skip to content

[Test] Improve subscription client and disabled-mode coverage - #18716

Open
Caideyipi wants to merge 2 commits into
apache:masterfrom
Caideyipi:subscription-coverage-gaps
Open

Caideyipi wants to merge 2 commits into
apache:masterfrom
Caideyipi:subscription-coverage-gaps

Conversation

@Caideyipi

Copy link
Copy Markdown
Collaborator

Description

Subscription protocol payload coverage

  • Cover poll request and response serialization for all payload types, unknown type lookup, null progress, and termination responses.
  • Cover subscribe RPC request/response conversion, including handshake, subscribe, unsubscribe, commit, poll, close, seek, empty bodies, sparse bodies, and null/empty poll buffers.

Client payload and utility coverage

  • Cover record, TsFile, and watermark message handlers, incompatible handler access, cleanup, copy/move/delete lifecycle, and poll result defaults.
  • Cover identifier parsing, set partitioning, and poll timer expiration, monotonic updates, overflow, and invalid timeout handling.

Disabled-mode integration coverage

  • Add an integration test for the community build where subscription is disabled.
  • Verify topic/subscription session statements return SUBSCRIPTION_NOT_ENABLED_ERROR.
  • Verify consumer handshake exposes the expected connection exception and critical exception chain.

Verification

  • iotdb-client/subscription full unit test suite: 84 tests passed.
  • IoTDBSubscriptionDisabledIT: 2 tests passed with the default integration-test profile.
  • IoTDBSubscriptionDisabledIT: 2 tests passed with the ClusterIT profile.
  • Spotless, Checkstyle, and git diff --check passed.
  • Checked open subscription-related PRs; no changed test file overlaps were found.

No new product defect was found while adding and running these tests.


This PR has:

  • been self-reviewed.
  • added unit tests or modified existing tests to cover new code paths, ensuring the threshold for code coverage.
  • added integration tests.
  • been tested in a test IoTDB cluster.

Key changed/added classes (or packages if there are too many classes) in this PR
  • org.apache.iotdb.rpc.subscription.payload.poll
  • org.apache.iotdb.rpc.subscription.payload.request
  • org.apache.iotdb.rpc.subscription.payload.response
  • org.apache.iotdb.session.subscription.payload
  • org.apache.iotdb.session.subscription.util
  • org.apache.iotdb.session.it.IoTDBSubscriptionDisabledIT

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant