Skip to content

test: fix failing custom endpoint test #758

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Dec 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions tests/integration/container/test_custom_endpoint.py
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,7 @@ def test_custom_endpoint_read_write_splitting__with_custom_endpoint_changes(
# This setting is not required for the test, but it allows us to also test re-creation of expired monitors since
# it takes more than 30 seconds to modify the cluster endpoint (usually around 140s).
props["custom_endpoint_idle_monitor_expiration_ms"] = 30_000
props["wait_for_custom_endpoint_info_timeout_ms"] = 30_000
conn = AwsWrapperConnection.connect(target_driver_connect, **kwargs, **props)

endpoint_members = self.endpoint_info["StaticMembers"]
Expand Down
3 changes: 3 additions & 0 deletions tests/integration/container/utils/rds_test_utility.py
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,9 @@ def failover_cluster_and_wait_until_writer_changed(
sleep(1)
cluster_address = socket.gethostbyname(cluster_endpoint)

# wait until all instances except initial writer instance to be available
instances = [x.get_instance_id() for x in TestEnvironment.get_current().get_instances() if x.get_instance_id() != initial_writer_id]
self.make_sure_instances_up(instances)
self.logger.debug("Testing.FinishedFailover", initial_writer_id, str((perf_counter_ns() - start) / 1_000_000))

def failover_cluster(self, cluster_id: Optional[str] = None, target_id: Optional[str] = None) -> None:
Expand Down
Loading