[
https://issues.apache.org/jira/browse/DRILL-5717?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16145711#comment-16145711
]
ASF GitHub Bot commented on DRILL-5717:
---------------------------------------
Github user vvysotskyi commented on a diff in the pull request:
https://github.com/apache/drill/pull/904#discussion_r135850258
--- Diff:
exec/java-exec/src/test/java/org/apache/drill/exec/fn/impl/TestCastFunctions.java
---
@@ -73,16 +74,23 @@ public void testCastByConstantFolding() throws
Exception {
@Test // DRILL-3769
public void testToDateForTimeStamp() throws Exception {
- final String query = "select to_date(to_timestamp(-1)) as col \n" +
- "from (values(1))";
+ String defaultTimezone = System.getProperty("user.timezone");
+ try {
+ System.setProperty("user.timezone","Etc/GMT");
+ final String query = "select to_date(to_timestamp(-1)) as col \n"
+ + "from (values(1))";
- testBuilder()
+ testBuilder()
.sqlQuery(query)
.ordered()
.baselineColumns("col")
.baselineValues(new DateTime(1969, 12, 31, 0, 0))
.build()
.run();
+ }finally {
--- End diff --
please add space: `} finally {`
> change some date time unit cases with specific timezone or Local
> ----------------------------------------------------------------
>
> Key: DRILL-5717
> URL: https://issues.apache.org/jira/browse/DRILL-5717
> Project: Apache Drill
> Issue Type: Bug
> Components: Tools, Build & Test
> Affects Versions: 1.9.0, 1.11.0
> Reporter: weijie.tong
>
> Some date time test cases like JodaDateValidatorTest is not Local
> independent .This will cause other Local's users's test phase to fail. We
> should let these test cases to be Local env independent.
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)