Skip to content

Add 3C3D IoTConsensusV2 integration tests#17257

Open
Pengzna wants to merge 4 commits intoapache:masterfrom
Pengzna:iotv2-it
Open

Add 3C3D IoTConsensusV2 integration tests#17257
Pengzna wants to merge 4 commits intoapache:masterfrom
Pengzna:iotv2-it

Conversation

@Pengzna
Copy link
Collaborator

@Pengzna Pengzna commented Mar 4, 2026

Add IT for IoTConsensusV2 on a 3 ConfigNode + 3 DataNode cluster.

Tests:

  1. test3C3DWriteFlushAndQuery: Start 3C3D cluster, write data, flush, and verify data via query.
  2. testReplicaConsistencyAfterLeaderStop: With replication factor 2, stop the leader DataNode and verify the former follower (new leader) serves the same data after failover.

Implementation details:

  1. Config: IoTConsensusV2 batch/stream mode, DataReplicationFactor=2, SchemaReplicationFactor=3.
  2. Uses getConnection(followerNode) to query the specific follower instead of a random available node.
  3. Extends IoTDBRegionOperationReliabilityITFramework for getDataRegionMapWithLeader and cluster setup/teardown.
  4. Uses getString() in verifyDataConsistency for IoTDB JDBC compatibility.

@Pengzna
Copy link
Collaborator Author

Pengzna commented Mar 4, 2026

TODO: move @DailyIt to batch and stream files instead of base file

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