Skip to content

fix flaky test_backfill_monthly_metrics_for_site by freezing time - #387

Merged
OmarIthawi merged 1 commit into
masterfrom
freeze_time_backfill_test_data
Jul 8, 2021
Merged

OmarIthawi merged 1 commit into
masterfrom
freeze_time_backfill_test_data

Conversation

@OmarIthawi

@OmarIthawi OmarIthawi commented Jul 8, 2021 •

Copy link
Copy Markdown
Contributor

test_backfill_monthly_metrics_for_site seems to fail sometimes depending on the time it's being run. using pytest-freezegun to freeze the time and make sure it returns consistent results.

Old failure on Jun 30, 2021

image

`test_backfill_monthly_metrics_for_site` seems to fail sometimes depending on the time it's being run. using [pytest-freezegun](https://pypi.org/project/pytest-freezegun/) to freeze the time and make sure it returns consistent results.
@OmarIthawi
OmarIthawi force-pushed the freeze_time_backfill_test_data branch from 6d971da to 0cc7065 Compare July 8, 2021 09:35
@OmarIthawi
OmarIthawi marked this pull request as ready for review July 8, 2021 09:38

@thraxil thraxil left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, we meet again datetime.now()...

@OmarIthawi

Copy link
Copy Markdown
Contributor Author

Yes, we meet again datetime.now()...

I knew you'd be "excited"

@OmarIthawi
OmarIthawi merged commit 574700d into master Jul 8, 2021
@OmarIthawi
OmarIthawi deleted the freeze_time_backfill_test_data branch July 8, 2021 09:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants