From 53797b74f5a0b31425f3bb5a18d336a057f7d5ac Mon Sep 17 00:00:00 2001 From: Hyunsik Choi Date: Thu, 5 Jun 2014 11:27:25 -0700 Subject: [PATCH] TAJO-868: TestDateTimeFunctions unit test is occasionally failed. --- CHANGES | 2 ++ .../apache/tajo/engine/function/TestDateTimeFunctions.java | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/CHANGES b/CHANGES index 7316e4df47..212e6aa74d 100644 --- a/CHANGES +++ b/CHANGES @@ -58,6 +58,8 @@ Release 0.9.0 - unreleased BUG FIXES + TAJO-868: TestDateTimeFunctions unit test is occasionally failed. (hyunsik) + TAJO-851: Timestamp type test of TestSQLExpression::testCastFromTable fails in jenkins CI test. (Hyoungjun Kim via hyunsik) diff --git a/tajo-core/src/test/java/org/apache/tajo/engine/function/TestDateTimeFunctions.java b/tajo-core/src/test/java/org/apache/tajo/engine/function/TestDateTimeFunctions.java index 1c59770e82..ef691f7216 100644 --- a/tajo-core/src/test/java/org/apache/tajo/engine/function/TestDateTimeFunctions.java +++ b/tajo-core/src/test/java/org/apache/tajo/engine/function/TestDateTimeFunctions.java @@ -391,7 +391,7 @@ public void testDateTimeNow() throws IOException { testSimpleEval("select current_date();", new String[]{dateFormat(expectedDate, "yyyy-MM-dd")}); testSimpleEval("select cast(extract(hour from current_time()) as INT4);", - new String[]{dateFormat(expectedDate, "HH")}); + new String[]{String.valueOf(Integer.parseInt(dateFormat(expectedDate, "HH")))}); } finally { TajoConf.setCurrentTimeZone(originTimeZone); TimeZone.setDefault(systemOriginTimeZone); @@ -413,7 +413,7 @@ public void testTimeValueKeyword() throws IOException { testSimpleEval("select current_date;", new String[]{dateFormat(expectedDate, "yyyy-MM-dd")}); testSimpleEval("select cast(extract(hour from current_time) as INT4);", - new String[]{dateFormat(expectedDate, "HH")}); + new String[]{String.valueOf(Integer.parseInt(dateFormat(expectedDate, "HH")))}); } finally { TajoConf.setCurrentTimeZone(originTimeZone); TimeZone.setDefault(systemOriginTimeZone);