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 issue in testSourceMetricCommandWithTimestamp integ test with different timezones and locales. #2522

Merged
merged 2 commits into from
Feb 16, 2024

Conversation

vmmusings
Copy link
Member

@vmmusings vmmusings commented Feb 16, 2024

Description

[Describe what this change achieves]
Switched to LocalDateTime for better handling of timezone and locale.
It uses system timezone irrespective of timezone set in JVM using -Dtests.locale=hi-IN -Dtests.timezone=America/Atka.

Error before fix.

timestamp:२०२४-०२-१६ १०:१७:४७ in unsupported format

Testing

Following commands worked without error.

./gradlew ':integ-test:integTest' --tests "org.opensearch.sql.ppl.PrometheusDataSourceCommandsIT.testSourceMetricCommandWithTimestamp" -Dtests.seed=1574D2ADC54025EE -Dtests.security.manager=false -Dtests.locale=ja-JP-u-ca-japanese-x-lvariant-JP -Dtests.timezone=VST
./gradlew ':integ-test:integTest' --tests "org.opensearch.sql.ppl.PrometheusDataSourceCommandsIT.testSourceMetricCommandWithTimestamp" -Dtests.seed=EE70DA8B4C47EEC -Dtests.security.manager=false -Dtests.locale=hi-IN -Dtests.timezone=America/Atka

Issues Resolved

#1275
#2517

Check List

  • New functionality includes testing.
    • All tests pass, including unit test, integration test and doctest
  • New functionality has been documented.
    • New functionality has javadoc added
    • New functionality has user manual doc added
  • Commits are signed per the DCO using --signoff

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

Signed-off-by: Vamsi Manohar <reddyvam@amazon.com>
Signed-off-by: Vamsi Manohar <reddyvam@amazon.com>
@vmmusings vmmusings marked this pull request as ready for review February 16, 2024 21:25
@vmmusings vmmusings self-assigned this Feb 16, 2024
@vmmusings vmmusings added backport 2.x backport 2.12 bug Something isn't working labels Feb 16, 2024
@vmmusings vmmusings changed the title Timezone fix Fix issue in testSourceMetricCommandWithTimestamp integ test with different timezones and locales. Feb 16, 2024
Copy link
Collaborator

@noCharger noCharger left a comment

Choose a reason for hiding this comment

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

Nice!

Copy link

codecov bot commented Feb 16, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (cddffc6) 95.41% compared to head (b18ec13) 95.41%.
Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff            @@
##               main    #2522   +/-   ##
=========================================
  Coverage     95.41%   95.41%           
  Complexity     5027     5027           
=========================================
  Files           483      483           
  Lines         14016    14016           
  Branches        944      944           
=========================================
  Hits          13374    13374           
  Misses          621      621           
  Partials         21       21           
Flag Coverage Δ
sql-engine 95.41% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@vmmusings
Copy link
Member Author

bwc tests are unrelated.

@vmmusings vmmusings merged commit fcc4be3 into opensearch-project:main Feb 16, 2024
28 of 31 checks passed
opensearch-trigger-bot bot pushed a commit that referenced this pull request Feb 16, 2024
…ferent timezones and locales. (#2522)

* Timezon fix

Signed-off-by: Vamsi Manohar <reddyvam@amazon.com>

* Timezon fix

Signed-off-by: Vamsi Manohar <reddyvam@amazon.com>

---------

Signed-off-by: Vamsi Manohar <reddyvam@amazon.com>
(cherry picked from commit fcc4be3)
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
opensearch-trigger-bot bot pushed a commit that referenced this pull request Feb 16, 2024
…ferent timezones and locales. (#2522)

* Timezon fix

Signed-off-by: Vamsi Manohar <reddyvam@amazon.com>

* Timezon fix

Signed-off-by: Vamsi Manohar <reddyvam@amazon.com>

---------

Signed-off-by: Vamsi Manohar <reddyvam@amazon.com>
(cherry picked from commit fcc4be3)
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
vmmusings pushed a commit that referenced this pull request Feb 16, 2024
…ferent timezones and locales. (#2522) (#2523)

* Timezon fix



* Timezon fix



---------


(cherry picked from commit fcc4be3)

Signed-off-by: Vamsi Manohar <reddyvam@amazon.com>
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
vmmusings pushed a commit that referenced this pull request Feb 16, 2024
…ferent timezones and locales. (#2522) (#2524)

* Timezon fix



* Timezon fix



---------


(cherry picked from commit fcc4be3)

Signed-off-by: Vamsi Manohar <reddyvam@amazon.com>
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants