mirror of
https://github.com/neondatabase/neon.git
synced 2026-01-15 17:32:56 +00:00
test: less racy test_delete_timeline_client_hangup
with the SharedRetried the first request creates a task which will continue to the pause point regardless of the first request, so we need to accept a 404 as success.
This commit is contained in:
@@ -462,9 +462,16 @@ def test_delete_timeline_client_hangup(neon_env_builder: NeonEnvBuilder):
|
||||
# ok, retry without failpoint, it should succeed
|
||||
ps_http.configure_failpoints((failpoint_name, "off"))
|
||||
|
||||
# this should succeed
|
||||
ps_http.timeline_delete(env.initial_tenant, child_timeline_id, timeout=2)
|
||||
# the second call will try to transition the timeline into Stopping state, but it's already in that state
|
||||
env.pageserver.allowed_errors.append(
|
||||
f".*{child_timeline_id}.*Ignoring new state, equal to the existing one: Stopping"
|
||||
)
|
||||
try:
|
||||
ps_http.timeline_delete(env.initial_tenant, child_timeline_id)
|
||||
env.pageserver.allowed_errors.append(
|
||||
f".*{child_timeline_id}.*Ignoring new state, equal to the existing one: Stopping"
|
||||
)
|
||||
except PageserverApiException as e:
|
||||
if e.status_code != 404:
|
||||
raise e
|
||||
else:
|
||||
# mock_s3 was fast enough to delete before we got the request in
|
||||
env.pageserver.allowed_errors.append(
|
||||
f".*{child_timeline_id}.*Error processing HTTP request: NotFound: timeline not found"
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user