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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix random test failures in TestExcerpt #to_liquid #8884

Merged
merged 1 commit into from
Nov 17, 2021

Commits on Nov 16, 2021

  1. Fix random test failures in TestExcerpt #to_liquid.

    Failures can occur when the random seed orders TestFilters tests before
    TestExcerpt and the tests are run with a system time zone that's has a
    non-zero offset on 2013-07-22.
    
    The TestFilters setup changes ENV["TZ"] to "UTC" but doesn't reset it.
    
    The TestExcerpt#to_liquid test fails because @excerpt.to_liquid["date"]
    returns a UTC time and Time.parse("2013-07-22") returns a time in the
    system time zone:
    
      Failure: TestExcerpt#test_: An extracted excerpt #to_liquid should
      contain the proper page data to mimic the post liquid.
      [jekyll/test/test_excerpt.rb:103] Minitest::Assertion:
      Expected: 2013-07-22 00:00:00 +0000
        Actual: 2013-07-22 00:00:00 +0100
    
    Add a teardown to TestFilters to reset ENV["TZ"].
    philr committed Nov 16, 2021
    Configuration menu
    Copy the full SHA
    1511f33 View commit details
    Browse the repository at this point in the history