scylladb / java-driver

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

Add `MockResolverIT#replace_cluster_test()` #335

Closed Bouncheck closed 2 months ago

Bouncheck commented 2 months 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 2 months 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 2 months ago

@Bouncheck , can you please address test failures on CICD

Bouncheck commented 2 months ago

Created #340 . It should solve the 6.1.1 failures.

dkropachev commented 2 months ago

@Bouncheck , is it ready ?

Bouncheck commented 2 months ago

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

dkropachev commented 2 months 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.