[ 
https://issues.apache.org/jira/browse/CALCITE-2145?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16334806#comment-16334806
 ] 

ASF GitHub Bot commented on CALCITE-2145:
-----------------------------------------

GitHub user asolimando opened a pull request:

    https://github.com/apache/calcite-avatica/pull/22

    [CALCITE-2145] Workaround on test failing as depending on local timezone

    Workaround fixing the test while waiting for a fix avoiding any (unwanted) 
dependency on user's timezone.
    Tested successfully with GMT+2 and GMT+8 (e.g., MAVEN_OPTS="$MAVEN_OPTS 
-Duser.timezone=GMT+2" mvn clean test).

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/asolimando/calcite-avatica master

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/calcite-avatica/pull/22.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #22
    
----
commit 3015952daf3cc5a172542125540fa72b5d7a6f87
Author: Alessandro Solimando <18898964+asolimando@...>
Date:   2018-01-22T19:48:25Z

    [CALCITE-2145] Workaround on test failing as depending on local timezone

----


> Avatica tests fail depending on local timezone
> ----------------------------------------------
>
>                 Key: CALCITE-2145
>                 URL: https://issues.apache.org/jira/browse/CALCITE-2145
>             Project: Calcite
>          Issue Type: Bug
>          Components: avatica
>    Affects Versions: avatica-1.10.0, avatica-1.11.0
>            Reporter: Alessandro Solimando
>            Priority: Major
>
> Running the tests runs correctly with timezone forced to UTC, but fail with 
> other timezones (verified with GMT+8 and GMT+2).
> All methods using default locale (e.g.,  Locale.getDefault()) or timezone 
> (e.g., TimeZone.getDefault()) should have been forbidden (-CALCITE-1167-).
> For instance, this command works:
> {panel}
> MAVEN_OPTS="$MAVEN_OPTS -Duser.timezone=UTC" mvn clean test
> {panel}
> This other command fails:
> {panel}
> MAVEN_OPTS="$MAVEN_OPTS -Duser.timezone=GMT+8" mvn clean test
> {panel}
> In what follows the relevant extract from console when running mvn test.
> {panel:title=mvn clean test console output extract}
> [...]
> 2018-01-22 01:56:02,633 [main] INFO - Creating table BATCH_EXECUTE_33
>  2018-01-22 01:56:02,635 [main] INFO - Creating table BATCH_EXECUTE_34
>  2018-01-22 01:56:02,675 [main] INFO - Creating table BATCH_CLEARS_36
>  2018-01-22 01:56:02,676 [main] INFO - Creating table BATCH_CLEARS_37
>  Tests run: 78, Failures: 2, Errors: 0, Skipped: 4, Time elapsed: 0.569 sec 
> <<< FAILURE! - in org.apache.calcite.avatica.RemoteDriverTest
>  testBatchInsertWithDates[JSON](org.apache.calcite.avatica.RemoteDriverTest) 
> Time elapsed: 0.013 sec <<< FAILURE!
>  java.lang.AssertionError: Wrong day for row 0 expected:<21> but was:<20>
>  at 
> org.apache.calcite.avatica.RemoteDriverTest.executeBatchInsertWithDates(RemoteDriverTest.java:1444)
>  at 
> org.apache.calcite.avatica.RemoteDriverTest.access$1100(RemoteDriverTest.java:91)
>  at 
> org.apache.calcite.avatica.RemoteDriverTest.eachConnection(RemoteDriverTest.java:228)
>  at 
> org.apache.calcite.avatica.RemoteDriverTest.testBatchInsertWithDates(RemoteDriverTest.java:1379)
> testBatchInsertWithDates[PROTOBUF](org.apache.calcite.avatica.RemoteDriverTest)
>  Time elapsed: 0.003 sec <<< FAILURE!
>  java.lang.AssertionError: Wrong day for row 0 expected:<21> but was:<20>
>  at 
> org.apache.calcite.avatica.RemoteDriverTest.executeBatchInsertWithDates(RemoteDriverTest.java:1444)
>  at 
> org.apache.calcite.avatica.RemoteDriverTest.access$1100(RemoteDriverTest.java:91)
>  at 
> org.apache.calcite.avatica.RemoteDriverTest.eachConnection(RemoteDriverTest.java:228)
>  at 
> org.apache.calcite.avatica.RemoteDriverTest.testBatchInsertWithDates(RemoteDriverTest.java:1379)
> [...]
> Results :
> Failed tests: 
>  
> RemoteDriverTest.testBatchInsertWithDates:1379->eachConnection:228->access$1100:91->executeBatchInsertWithDates:1444
>  Wrong day for row 0 expected:<21> but was:<20>
>  
> RemoteDriverTest.testBatchInsertWithDates:1379->eachConnection:228->access$1100:91->executeBatchInsertWithDates:1444
>  Wrong day for row 0 expected:<21> but was:<20>
> Tests run: 219, Failures: 2, Errors: 0, Skipped: 15
> [INFO] 
> ------------------------------------------------------------------------
>  [INFO] Reactor Summary:
>  [INFO] 
>  [INFO] Apache Calcite Avatica Project ..................... SUCCESS [ 2.233 
> s]
>  [INFO] Apache Calcite Avatica Metrics ..................... SUCCESS [ 2.984 
> s]
>  [INFO] Apache Calcite Avatica ............................. SUCCESS [ 26.595 
> s]
>  [INFO] Apache Calcite Avatica Server ...................... FAILURE [ 13.671 
> s]
>  [INFO] Apache Calcite Avatica Standalone Server ........... SKIPPED
>  [INFO] Apache Calcite Avatica Docker images ............... SKIPPED
>  [INFO] Apache Calcite Avatica Dropwizard Metrics 3 ........ SKIPPED
>  [INFO] Apache Calcite Avatica Noop Driver ................. SKIPPED
>  [INFO] Apache Calcite Avatica Compatibility Kit ........... SKIPPED
>  [INFO] Apache Calcite Avatica (Shaded) .................... SKIPPED
>  [INFO] 
> ------------------------------------------------------------------------
>  [INFO] BUILD FAILURE
>  [INFO] 
> ------------------------------------------------------------------------
> [...]
> {panel}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to