test: less flaky test_synthetic_size_while_deleting (#7622)

#7585 introduced test case for deletions while synthetic size is being
calculated. The test has a race against deletion, but we only accept one
outcome. Fix it to accept 404 as well, as we cannot control from outside
which outcome happens.

Evidence:
https://neon-github-public-dev.s3.amazonaws.com/reports/pr-7456/8970595458/index.html#/testresult/32a5b2f8c4094bdb
This commit is contained in:
Joonas Koivunen
2024-05-06 18:52:51 +03:00
committed by GitHub
parent df1def7018
commit a96e15cb6b

View File

@@ -668,9 +668,9 @@ def test_synthetic_size_while_deleting(neon_env_builder: NeonEnvBuilder):
client.configure_failpoints((failpoint, "off"))
with pytest.raises(
PageserverApiException, match="Failed to refresh gc_info before gathering inputs"
):
# accept both, because the deletion might still complete before
matcher = "(Failed to refresh gc_info before gathering inputs|NotFound: tenant)"
with pytest.raises(PageserverApiException, match=matcher):
completion.result()
# this happens on both cases