Skip to content

Conversation

@bdemers
Copy link
Member

@bdemers bdemers commented Jul 18, 2024

NOTE:

This is a guess at a fix. There are probably other ways to fix this test too:

  • For a UTC timezone via surefire system properties
  • Change the timestamps
  • probably a few more, with a bit more knowledge of IoTDB...

Description

DateTimeUtilsTest.getConvertDurationIncludingMonthUnit() uses dates conversions that are TZ specfic.
Wrapping the test in a session, allows this single test to use a set timezone, while not affecting the behavior of other tests

Fixes: #12970


This PR has:

  • been self-reviewed.
    • concurrent read
    • concurrent write
    • concurrent read and write
  • added documentation for new or modified features or behaviors.
  • added Javadocs for most classes and all non-trivial methods.
  • added or updated version, license, or notice information
  • added comments explaining the "why" and the intent of the code wherever would not be obvious
    for an unfamiliar reader.
  • added unit tests or modified existing tests to cover new code paths, ensuring the threshold
    for code coverage.
  • added integration tests.
  • been tested in a test IoTDB cluster.

Key changed/added classes (or packages if there are too many classes) in this PR

DateTimeUtilsTest.getConvertDurationIncludingMonthUnit() uses dates conversions that are TZ specfic.
Wrapping the test in a session, allows this single test to use a set timezone, while not affecting the behavior of other tests

Fixes: apache#12970
Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

Hi, this is your first pull request in IoTDB project. Thanks for your contribution! IoTDB will be better because of you.

@HTHou HTHou merged commit b527e06 into apache:master Jul 19, 2024
@bdemers bdemers deleted the bdemers/fix-test-tz-12970 branch July 19, 2024 13:24
JackieTien97 pushed a commit that referenced this pull request Jul 22, 2024
DateTimeUtilsTest.getConvertDurationIncludingMonthUnit() uses dates conversions that are TZ specfic.
Wrapping the test in a session, allows this single test to use a set timezone, while not affecting the behavior of other tests

Fixes: #12970
(cherry picked from commit b527e06)
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.

[Bug] DateTimeUtilsTest.getConvertDurationIncludingMonthUnit() tests are timezone dependent

2 participants