Exclude new time zones from TestTimeZoneUtils#20638
Exclude new time zones from TestTimeZoneUtils#20638tdcmeehan merged 1 commit intoprestodb:masterfrom
Conversation
There was a problem hiding this comment.
When the Joda version was upgraded in this PR: #19758, the release notes mentioned that the runtime version needed to be upgraded to have the relevant timezone data.
If we have to exclude, we should not exclude all Europe timezones from tests but only the ones which were added as part of the upgrade.
Also, did you also try running the test using the mentioned Java runtime version (11.0.10)?
There was a problem hiding this comment.
openjdk version "17.0.7" 2023-04-18
OpenJDK Runtime Environment Homebrew (build 17.0.7+0)
OpenJDK 64-Bit Server VM Homebrew (build 17.0.7+0, mixed mode, sharing)
this version of java , no issue is coming
There was a problem hiding this comment.
@imjalpreet please help to review this PR.
There was a problem hiding this comment.
@tdcmeehan please help to review the PR.
tdcmeehan
left a comment
There was a problem hiding this comment.
Changes look good. Please fix commit message in accordance to our guidelines. In particular, describe the fix, use proper captilization, and use the imperative mood. https://cbea.ms/git-commit/
i have done required changes. |
|
This is better. Please try the following since the commit message title is over 50 characters |
|
@tdcmeehan done please review and merge accordingly |


Before fix:
Error : [ERROR] Tests run: 2, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 2.448 s <<< FAILURE! - in com.facebook.presto.util.TestTimeZoneUtils
[ERROR] com.facebook.presto.util.TestTimeZoneUtils.testNamedZones Time elapsed: 1.293 s <<< FAILURE!
java.time.zone.ZoneRulesException: Unknown time-zone ID: Europe/Kyiv
at java.time.zone.ZoneRulesProvider.getProvider(ZoneRulesProvider.java:272)
at java.time.zone.ZoneRulesProvider.getRules(ZoneRulesProvider.java:227)
at java.time.ZoneRegion.ofId(ZoneRegion.java:120)
at java.time.ZoneId.of(ZoneId.java:411)
at java.time.ZoneId.of(ZoneId.java:359)
at com.facebook.presto.util.TestTimeZoneUtils.assertTimeZone(TestTimeZoneUtils.java:98)
at com.facebook.presto.util.TestTimeZoneUtils.testNamedZones(TestTimeZoneUtils.java:81)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.testng.internal.invokers.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:135)
at org.testng.internal.invokers.TestInvoker.invokeMethod(TestInvoker.java:673)
at org.testng.internal.invokers.TestInvoker.invokeTestMethod(TestInvoker.java:220)
at org.testng.internal.invokers.MethodRunner.runInSequence(MethodRunner.java:50)
at org.testng.internal.invokers.TestInvoker$MethodInvocationAgent.invoke(TestInvoker.java:945)
at org.testng.internal.invokers.TestInvoker.invokeTestMethods(TestInvoker.java:193)
at org.testng.internal.invokers.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:146)
at org.testng.internal.invokers.TestMethodWorker.run(TestMethodWorker.java:128)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:750)
[INFO]
[INFO] Results:
[INFO]
[ERROR] Failures:
[ERROR] TestTimeZoneUtils.testNamedZones:81->assertTimeZone:98 » ZoneRules Unknown time-zone ID: Europe/Kyiv
[INFO]
[ERROR] Tests run: 2, Failures: 1, Errors: 0, Skipped: 0
[INFO]
After fix:
[INFO] Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 2.826 s - in com.facebook.presto.util.TestTimeZoneUtils
[INFO]
[INFO] Results:
[INFO]
[INFO] Tests run: 2, Failures: 0, Errors: 0, Skipped: 0
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 01:13 min
[INFO] Finished at: 2023-08-23T16:41:58+05:30
[INFO] ------------------------------------------------------------------------