Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tests: Increase purging gap to try to increase reliability #578

Merged
merged 1 commit into from
Sep 18, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions test_main.py
Original file line number Diff line number Diff line change
Expand Up @@ -248,6 +248,8 @@ def test_purge_db(empty_deployment):
# Use the current time to avoid deployment purge trigger
timestamp_before = datetime.now(timezone.utc)
str_before = timestamp_before.isoformat(timespec="microseconds")
timestamp_cutoff = timestamp_before + timedelta(seconds=1)
str_cutoff = timestamp_cutoff.isoformat(timespec="microseconds")

data_before = dict(
version=dict(
Expand Down Expand Up @@ -276,7 +278,7 @@ def test_purge_db(empty_deployment):
)],
)

timestamp_after = timestamp_before + timedelta(microseconds=1)
timestamp_after = timestamp_cutoff + timedelta(seconds=1)
str_after = timestamp_after.isoformat(timespec="microseconds")

data_after = dict(
Expand Down Expand Up @@ -335,7 +337,7 @@ def filter_test_data(data):

# Trigger the purge at the boundary
publisher.publish(
dict(database=database, timedelta=dict(stamp=str_after))
dict(database=database, timedelta=dict(stamp=str_cutoff))
)

# Wait and check for the purge
Expand Down