Skip to content

Run tests in utc#9168

Merged
jekyllbot merged 1 commit intojekyll:masterfrom
oturpe:run-tests-in-utc
Nov 7, 2022
Merged

Run tests in utc#9168
jekyllbot merged 1 commit intojekyll:masterfrom
oturpe:run-tests-in-utc

Conversation

@oturpe
Copy link
Copy Markdown
Contributor

@oturpe oturpe commented Oct 24, 2022

This is a 🐛 bug fix.

  • I've added tests (if it's a bug, feature or enhancement)
  • I've adjusted the documentation (if it's a feature or enhancement)
  • The test suite passes locally (run script/cibuild to verify this)

Summary

If on a system where system timezone is not +00,
when tests are launched with 'script/test', test case
"TestFilters#test_: filters jsonify filter should convert drop to json"
fails due to difference in expected and actual value of 'date'.
This difference equals the system timezone offset.
Some other forms of lauching tests do work,
such as 'script/test test/test_filters.rb'.

Make the tests run correctly regardless of system timezone
by setting TZ=UTC.

Context

Not related to a GitHub issue.

If on a system where system timezone is not +00,
when tests are launched with 'script/test', test case
"TestFilters#test_: filters jsonify filter should convert drop to json"
fails due to difference in expected and actual value of 'date'.
This difference equals the system timezone offset.
Some other forms of lauching tests do work,
such as 'script/test test/test_filters.rb'.

Make the tests run correctly regardless of system timezone
by setting TZ=UTC.
@yboulkaid
Copy link
Copy Markdown
Contributor

I have also stumbled upon this when running tests locally, that would be nice to get in!

@ashmaroli
Copy link
Copy Markdown
Member

Thanks @oturpe
@jekyllbot: merge +dev

@jekyllbot jekyllbot merged commit 28a475a into jekyll:master Nov 7, 2022
jekyllbot added a commit that referenced this pull request Nov 7, 2022
github-actions bot pushed a commit that referenced this pull request Nov 7, 2022
Otto Liljalaakso: Run tests in UTC timezone (#9168)

Merge pull request 9168
@oturpe oturpe deleted the run-tests-in-utc branch November 7, 2022 07:35
@oturpe
Copy link
Copy Markdown
Contributor Author

oturpe commented Nov 7, 2022

Thank you!

@jekyll jekyll locked and limited conversation to collaborators Nov 7, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants