Skip to content

Commit

Permalink
test_download_remote_layers_api: try to make less flaky
Browse files Browse the repository at this point in the history
the size comparisons in this test are quite much.
  • Loading branch information
koivunej committed Sep 7, 2023
1 parent 0f13deb commit 398b57a
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion test_runner/regress/test_ondemand_download.py
Original file line number Diff line number Diff line change
Expand Up @@ -396,9 +396,19 @@ def get_resident_physical_size():
wait_until(10, 0.2, lambda: assert_tenant_state(client, tenant_id, "Active"))

###### Phase 1: exercise download error code path

# comparison here is requiring the size to be at least the previous size, because it's possible received WAL after last_flush_lsn_upload
# witnessed for example difference of 29827072 (filled_current_physical) to 29868032 (here) is no good reason to fail a test.
this_time = get_api_current_physical_size()
assert (
filled_current_physical == get_api_current_physical_size()
filled_current_physical <= this_time
), "current_physical_size is sum of loaded layer sizes, independent of whether local or remote"
if filled_current_physical != this_time:
log.info(
f"fixing up filled_current_physical from {filled_current_physical} to {this_time} ({this_time - filled_current_physical})"
)
filled_current_physical = this_time

post_unlink_size = get_resident_physical_size()
log.info(f"post_unlink_size: {post_unlink_size}")
assert (
Expand Down

0 comments on commit 398b57a

Please sign in to comment.