scylladb / java-driver

ScyllaDB Java Driver for ScyllaDB and Apache Cassandra, based on the DataStax Java Driver
Apache License 2.0
61 stars 37 forks source link

Add `MockResolverIT#replace_cluster_test()` #335

Closed Bouncheck closed 3 weeks ago

Bouncheck commented 1 month ago

Adds MockResolverIT#replace_cluster_test() as a test method that runs the replace cluster scenario and checks if driver managed to reconnect.

In the test we create three node cluster and replace it with completely new one. Hostname is mocked and points to all 3 nodes.

Bouncheck commented 4 weeks ago

I'll squash review adjustments commit into others before merge. Actually we probably don't want to merge this until the reconnection to the new cluster works, which means fixing the unresolved socket getting overwritten.

dkropachev commented 3 weeks ago

@Bouncheck , can you please address test failures on CICD

Bouncheck commented 3 weeks ago

Created #340 . It should solve the 6.1.1 failures.

dkropachev commented 3 weeks ago

@Bouncheck , is it ready ?

Bouncheck commented 3 weeks ago

Yes, but it was a little flaky with cassandra. Should i reduce number of nodes to 2?

dkropachev commented 3 weeks ago

Yes, but it was a little flaky with cassandra. Should i reduce number of nodes to 2?

I see it is fine, let's address it later.