Skip to content

Commit 5a9a8c9

Browse files
test: fix failing custom endpoint test (#758)
1 parent 3e81164 commit 5a9a8c9

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

Diff for: tests/integration/container/test_custom_endpoint.py

+1
Original file line numberDiff line numberDiff line change
@@ -201,6 +201,7 @@ def test_custom_endpoint_read_write_splitting__with_custom_endpoint_changes(
201201
# This setting is not required for the test, but it allows us to also test re-creation of expired monitors since
202202
# it takes more than 30 seconds to modify the cluster endpoint (usually around 140s).
203203
props["custom_endpoint_idle_monitor_expiration_ms"] = 30_000
204+
props["wait_for_custom_endpoint_info_timeout_ms"] = 30_000
204205
conn = AwsWrapperConnection.connect(target_driver_connect, **kwargs, **props)
205206

206207
endpoint_members = self.endpoint_info["StaticMembers"]

Diff for: tests/integration/container/utils/rds_test_utility.py

+3
Original file line numberDiff line numberDiff line change
@@ -163,6 +163,9 @@ def failover_cluster_and_wait_until_writer_changed(
163163
sleep(1)
164164
cluster_address = socket.gethostbyname(cluster_endpoint)
165165

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

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

0 commit comments

Comments
 (0)