You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@calcite.apache.org by GitBox <gi...@apache.org> on 2021/09/23 18:32:55 UTC

[GitHub] [calcite] asolimando opened a new pull request #2536: [CALCITE-4793] Fix Cassandra and ElasticSearch tests

asolimando opened a new pull request #2536:
URL: https://github.com/apache/calcite/pull/2536


   The PR comprises two commits:
   
   1. ElasticSearch: Replace deprecated `com.google.common.io.Files.createTempDir()` with `java.nio.file.Files.createTempDirectory()` in ElasticSearch tests
   
   2. Cassandra: Finally the test failure for Cassandra was related to retrieving a timestamp, whose result depends on the user timezone (that's why it was failing on different timezones). The solution is to dynamically compute the expected timestamp output value depending on the user timezone.
   
   The changes have been validated locally as follow to cover different guava versions and timezones (for the latter, I have applied the patch from #2534):
   
   ```bash
   guavas=(19.0 25.0-jre 30.1.1-jre)
   timezones=(America/New_York UTC GMT Europe/Paris America/Los_Angeles)
   
   for g in ${guavas[@]}; do
     for tz in ${timezones[@]}; do
       ./gradlew --no-build-cache cleanTest test -Pguava.version=$g -Duser.timezone=$tz -q > /dev/null 2>&1
       if [ $? -eq 1 ]
       then
        echo "guava $g with tz $tz failed"
       else
        echo "guava $g with tz $tz succeeded"
       fi
     done
   done
   
   ```
   Output:
   > guava 19.0 with tz America/New_York succeeded
   > guava 19.0 with tz UTC succeeded
   > guava 19.0 with tz GMT succeeded
   > guava 19.0 with tz Europe/Paris succeeded
   > guava 19.0 with tz America/Los_Angeles succeeded
   > guava 25.0-jre with tz America/New_York succeeded
   > guava 25.0-jre with tz UTC succeeded
   > guava 25.0-jre with tz GMT succeeded
   > guava 25.0-jre with tz Europe/Paris succeeded
   > guava 25.0-jre with tz America/Los_Angeles succeeded
   > guava 30.1.1-jre with tz America/New_York succeeded
   > guava 30.1.1-jre with tz UTC succeeded
   > guava 30.1.1-jre with tz GMT succeeded
   > guava 30.1.1-jre with tz Europe/Paris succeeded
   > guava 30.1.1-jre with tz America/Los_Angeles succeeded
   > 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@calcite.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [calcite] julianhyde merged pull request #2536: [CALCITE-4793] Fix Cassandra and ElasticSearch tests

Posted by GitBox <gi...@apache.org>.
julianhyde merged pull request #2536:
URL: https://github.com/apache/calcite/pull/2536


   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@calcite.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org