Skip to content

Comments

CASSSIDECAR-308 CDC: Add end-to-end CDC integration tests#317

Merged
jyothsnakonisa merged 4 commits intoapache:trunkfrom
jyothsnakonisa:integration-test
Feb 18, 2026
Merged

CASSSIDECAR-308 CDC: Add end-to-end CDC integration tests#317
jyothsnakonisa merged 4 commits intoapache:trunkfrom
jyothsnakonisa:integration-test

Conversation

@jyothsnakonisa
Copy link
Contributor

Adding Integration test for CDC

  • Needs analytics 0.3.0 version for the test to pass and the analytics release in progress
  • Refactored code in MtlsTestHelper to reduce code redundancy

Copy link

@jmckenzie-dev jmckenzie-dev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Handful of nits. Only non-trivial thing is the version comparison being hard-coded to 4.1 for tests as I think we need >= 4.1 on that comparison.

With that change + the analytics version update it's a 👍🏻 from me.

* Integration test for CDC functionality.
* Tests that mutations on CDC-enabled tables are captured and published to TestCdcEventConsumer.
*/
public class CdcIntegrationTest extends SharedClusterCdcSidecarIntegrationTestBase

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks like solid "happy path does this actually work" testing. Do we have tests that randomly generate data, form a model of what we would expect the kafka messages to look like from that data, then run through the CDC pipeline and then confirm the end state to the modeled data?
If not - be a good follow up JIRA. :)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also - when we go that route we'll probably want to refactor out some shared helpers from this test to use in both.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure, we can add randomized integration tests going forward in follow up JIRAs.

ServiceConfiguration existingConfig = builder.build().serviceConfiguration();
ServiceConfiguration cdcServiceConfig = ServiceConfigurationImpl.builder()
.host(existingConfig.host())
.port(9043) // TODO: Make this port dynamically allocated

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

About this... should we go ahead and do this now? Or, if CI is very stable w/the current, have a follow up JIRA for a helper method that'll find an open port and then use it?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In cassandra-analytics, we are using port number that is passed in SidecarCdcClient.ClientConfig instead of using the port number from CdcDynamicSidecarInstancesProvider and hence test is not able to use correct port number in sidecar client when dynamic ports are being used for sidecar.

This needs a fix in cassandra-analytics, which I made a note of and this fix will go in next release. Until then, it is good to have an integration test(even with fixed port) to validate several cdc related changes that we are making. We can do a followup JIRA for the test to use dynamic port later.

Copy link

@jmckenzie-dev jmckenzie-dev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍🏻

@jyothsnakonisa jyothsnakonisa merged commit c1dbfbf into apache:trunk Feb 18, 2026
41 of 42 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

Development

Successfully merging this pull request may close these issues.

3 participants