mirror of
https://github.com/neondatabase/neon.git
synced 2026-01-15 17:32:56 +00:00
test: refactor -- begin to -funroll-loops in test_retried_detach_ancestor_after_failed_reparenting
This commit is contained in:
@@ -1163,14 +1163,17 @@ def test_retried_detach_ancestor_after_failed_reparenting(neon_env_builder: Neon
|
||||
# tracked offset in the pageserver log which is at least at the most recent activation
|
||||
offset = None
|
||||
|
||||
for nth_round in range(3):
|
||||
def another_detach():
|
||||
with pytest.raises(
|
||||
PageserverApiException,
|
||||
match=".*failed to reparent all candidate timelines, please retry",
|
||||
) as exc:
|
||||
http.detach_ancestor(env.initial_tenant, detached)
|
||||
PageserverApiException,
|
||||
match=".*failed to reparent all candidate timelines, please retry",
|
||||
) as exc:
|
||||
http.detach_ancestor(env.initial_tenant, detached)
|
||||
assert exc.value.status_code == 500
|
||||
|
||||
for nth_round in range(3):
|
||||
another_detach()
|
||||
|
||||
assert (
|
||||
http.timeline_detail(env.initial_tenant, detached)["ancestor_timeline_id"] is None
|
||||
), "first round should had detached 'detached'"
|
||||
|
||||
Reference in New Issue
Block a user