diff --git a/phoenix-queryserver-it/src/it/java/org/apache/phoenix/end2end/QueryServerBasicsIT.java b/phoenix-queryserver-it/src/it/java/org/apache/phoenix/end2end/QueryServerBasicsIT.java index 66820bd..de8b013 100644 --- a/phoenix-queryserver-it/src/it/java/org/apache/phoenix/end2end/QueryServerBasicsIT.java +++ b/phoenix-queryserver-it/src/it/java/org/apache/phoenix/end2end/QueryServerBasicsIT.java @@ -354,7 +354,6 @@ public void testParameterizedLikeExpression() throws Exception { assertFalse(rs.next()); } - @Ignore("PHOENIX-4664") @Test //This is the java reproducer for PHOENIX-4664 //This test only works as intended when the system timezone is NOT GMT @@ -370,6 +369,8 @@ public void testTimezoneLess() throws Exception { conn.commit(); LocalDateTime now = LocalDateTime.now(); + //Avatica has only millisecond timestamps + now = now.withNano((now.getNano()/1000000)*1000000); try(PreparedStatement upsert = conn.prepareStatement( "UPSERT INTO " + tableName + " VALUES (?, ?)") ) { @@ -380,7 +381,7 @@ public void testTimezoneLess() throws Exception { ResultSet rs = stmt.executeQuery("select * from " + tableName); assertTrue(rs.next()); LocalDateTime fromDB = rs.getTimestamp("i").toLocalDateTime(); - assertTrue("Timestamps do not match. inserted:" + now.toString() + "returned:" + fromDB.toString(), fromDB.compareTo(now) == 0); + assertTrue("Timestamps do not match. inserted:" + now.toString() + " returned:" + fromDB.toString(), fromDB.compareTo(now) == 0); } } } diff --git a/phoenix-queryserver-it/src/it/resources/hbase-site.xml b/phoenix-queryserver-it/src/it/resources/hbase-site.xml new file mode 100644 index 0000000..6118e9f --- /dev/null +++ b/phoenix-queryserver-it/src/it/resources/hbase-site.xml @@ -0,0 +1,31 @@ + + + + + + hbase.regionserver.wal.codec + org.apache.hadoop.hbase.regionserver.wal.IndexedWALEditCodec + + + phoenix.query.applyTimeZoneDisplacement + true + +