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

Fix flaky test caused by Timecop and Time.current #732

Merged
merged 1 commit into from Feb 5, 2020
Merged

Conversation

@laurentqro
Copy link
Contributor

laurentqro commented Feb 5, 2020

Timecop freezes time to 2013, which causes another subsequent test
(spec/features/campaign_requests_spec.rb:16), which uses Time.current,
to fail.

https://ci.integration.publishing.service.gov.uk/job/support/job/update-brexit-checker/8/console

Resetting the time after this test has run fixes the issue.

Timecop freezes time to 2013, which causes another subsequent test
(spec/features/campaign_requests_spec.rb:16), which uses Time.current,
to fail.

Resetting the time after this test has run fixes the issue.
@laurentqro laurentqro requested a review from huwd Feb 5, 2020
Copy link

huwd left a comment

Looks good, but there's a test failure, is that unrelated to this one?

@huwd
huwd approved these changes Feb 5, 2020
@laurentqro laurentqro merged commit 55a7cd5 into master Feb 5, 2020
2 checks passed
2 checks passed
continuous-integration/jenkins/branch This commit looks good
Details
continuous-integration/jenkins/security No security issues found
Details
@laurentqro laurentqro deleted the fix-flaky-test branch Feb 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants
You can’t perform that action at this time.