ClickHouse / clickhouse-java

ClickHouse Java Clients & JDBC Driver
https://clickhouse.com
Apache License 2.0
1.45k stars 534 forks source link

failed to pass timezone test cases on 0.1.55 #403

Open bill1234567890abc opened 5 years ago

bill1234567890abc commented 5 years ago

jdbc code is 0.1.55

Failed test cases are function testParseColumnsWithDifferentTimeZones() and testParseColumnsWithDifferentTimeZonesArray().

Error output:

java.lang.AssertionError: expected [1557136800000] but found [1557190800000] Expected :1557136800000 Actual :1557190800000

at org.testng.Assert.fail(Assert.java:94) at org.testng.Assert.failNotEquals(Assert.java:494) at org.testng.Assert.assertEquals(Assert.java:123) at org.testng.Assert.assertEquals(Assert.java:265) at org.testng.Assert.assertEquals(Assert.java:275) at ru.yandex.clickhouse.integration.TimeZoneTest.testParseColumnsWithDifferentTimeZones(TimeZoneTest.java:172) 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.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:85) at org.testng.internal.Invoker.invokeMethod(Invoker.java:696) at org.testng.internal.Invoker.invokeTestMethod(Invoker.java:882) at org.testng.internal.Invoker.invokeTestMethods(Invoker.java:1189) at org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:124) at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:108) at org.testng.TestRunner.privateRun(TestRunner.java:767) at org.testng.TestRunner.run(TestRunner.java:617) at org.testng.SuiteRunner.runTest(SuiteRunner.java:348) at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:343) at org.testng.SuiteRunner.privateRun(SuiteRunner.java:305) at org.testng.SuiteRunner.run(SuiteRunner.java:254) at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52) at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:86) at org.testng.TestNG.runSuitesSequentially(TestNG.java:1224) at org.testng.TestNG.runSuitesLocally(TestNG.java:1149) at org.testng.TestNG.run(TestNG.java:1057) at org.testng.IDEARemoteTestNG.run(IDEARemoteTestNG.java:72) at org.testng.RemoteTestNGStarter.main(RemoteTestNGStarter.java:123) =============================================== Default Suite Total tests run: 1, Failures: 1, Skips: 0 =============================================== Process finished with exit code 0 errors happened on DateTime('America/Los_Angeles'). If I change to other timezones like DateTime('America/New_York') , "America/Chicago", "America/Toronto", they are ok.
enqueue commented 4 years ago

What is the time zone you are running your tests in, i.e. what's the output of TimeZone.getDefault()? Since this is an integration test, please also let us know the time zone setting of your ClickHouse server.