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

Wraps DateTimeUtilsTest in a session #12971

Merged
merged 1 commit into from
Jul 19, 2024

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
39 checks passed
@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