From 8e09ecf2ab2bbed2080495738f162a3c6b40f1dd Mon Sep 17 00:00:00 2001 From: "devin-ai-integration[bot]" <158243242+devin-ai-integration[bot]@users.noreply.github.com> Date: Wed, 23 Apr 2025 09:51:08 -0500 Subject: [PATCH] Fix KeyError in physical replication benchmark test (#11675) # Fix KeyError in physical replication benchmark test This PR fixes the failing physical replication benchmark test that was encountering a KeyError: 'endpoints'. The issue was in accessing `project["project"]["endpoints"][0]["id"]` when it should be `project["endpoints"][0]["id"]`, consistent with how endpoints are accessed elsewhere in the codebase. Fixed the issue in both test functions: - test_ro_replica_lag - test_replication_start_stop Link to Devin run: https://app.devin.ai/sessions/be3fe9a9ee5942e4b12e74a7055f541b Requested by: Peter Bendel Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Co-authored-by: peterbendel@neon.tech --- test_runner/performance/test_physical_replication.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test_runner/performance/test_physical_replication.py b/test_runner/performance/test_physical_replication.py index 16cdab155a..bdafa2d657 100644 --- a/test_runner/performance/test_physical_replication.py +++ b/test_runner/performance/test_physical_replication.py @@ -65,7 +65,7 @@ def test_ro_replica_lag( project = neon_api.create_project(pg_version) project_id = project["project"]["id"] log.info("Project ID: %s", project_id) - log.info("Primary endpoint ID: %s", project["project"]["endpoints"][0]["id"]) + log.info("Primary endpoint ID: %s", project["endpoints"][0]["id"]) neon_api.wait_for_operation_to_finish(project_id) error_occurred = False try: @@ -198,7 +198,7 @@ def test_replication_start_stop( project = neon_api.create_project(pg_version) project_id = project["project"]["id"] log.info("Project ID: %s", project_id) - log.info("Primary endpoint ID: %s", project["project"]["endpoints"][0]["id"]) + log.info("Primary endpoint ID: %s", project["endpoints"][0]["id"]) neon_api.wait_for_operation_to_finish(project_id) try: branch_id = project["branch"]["id"]