You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flink.apache.org by tw...@apache.org on 2016/09/09 11:20:51 UTC
flink git commit: [FLINK-4592] [table] Fix flaky test
ScalarFunctionsTest.testCurrentTimePoint
Repository: flink
Updated Branches:
refs/heads/master e92f91aeb -> 8c0d62433
[FLINK-4592] [table] Fix flaky test ScalarFunctionsTest.testCurrentTimePoint
Project: http://git-wip-us.apache.org/repos/asf/flink/repo
Commit: http://git-wip-us.apache.org/repos/asf/flink/commit/8c0d6243
Tree: http://git-wip-us.apache.org/repos/asf/flink/tree/8c0d6243
Diff: http://git-wip-us.apache.org/repos/asf/flink/diff/8c0d6243
Branch: refs/heads/master
Commit: 8c0d62433a3f57d0753edb00e5c2bbc1adc467df
Parents: e92f91a
Author: twalthr <tw...@apache.org>
Authored: Fri Sep 9 13:19:18 2016 +0200
Committer: twalthr <tw...@apache.org>
Committed: Fri Sep 9 13:19:18 2016 +0200
----------------------------------------------------------------------
.../table/expressions/ScalarFunctionsTest.scala | 36 ++++++++++----------
1 file changed, 18 insertions(+), 18 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/flink/blob/8c0d6243/flink-libraries/flink-table/src/test/scala/org/apache/flink/api/table/expressions/ScalarFunctionsTest.scala
----------------------------------------------------------------------
diff --git a/flink-libraries/flink-table/src/test/scala/org/apache/flink/api/table/expressions/ScalarFunctionsTest.scala b/flink-libraries/flink-table/src/test/scala/org/apache/flink/api/table/expressions/ScalarFunctionsTest.scala
index 2d630ef..c15751e 100644
--- a/flink-libraries/flink-table/src/test/scala/org/apache/flink/api/table/expressions/ScalarFunctionsTest.scala
+++ b/flink-libraries/flink-table/src/test/scala/org/apache/flink/api/table/expressions/ScalarFunctionsTest.scala
@@ -791,34 +791,34 @@ class ScalarFunctionsTest extends ExpressionTestBase {
// manual test can be found in NonDeterministicTests
testAllApis(
- currentDate().cast(Types.STRING).charLength(),
- "currentDate().cast(STRING).charLength()",
- "CHAR_LENGTH(CAST(CURRENT_DATE AS VARCHAR))",
- "10")
+ currentDate().cast(Types.STRING).charLength() >= 5,
+ "currentDate().cast(STRING).charLength() >= 5",
+ "CHAR_LENGTH(CAST(CURRENT_DATE AS VARCHAR)) >= 5",
+ "true")
testAllApis(
- currentTime().cast(Types.STRING).charLength(),
- "currentTime().cast(STRING).charLength()",
- "CHAR_LENGTH(CAST(CURRENT_TIME AS VARCHAR))",
- "8")
+ currentTime().cast(Types.STRING).charLength() >= 5,
+ "currentTime().cast(STRING).charLength() >= 5",
+ "CHAR_LENGTH(CAST(CURRENT_TIME AS VARCHAR)) >= 5",
+ "true")
testAllApis(
- currentTimestamp().cast(Types.STRING).charLength() >= 22,
- "currentTimestamp().cast(STRING).charLength() >= 22",
- "CHAR_LENGTH(CAST(CURRENT_TIMESTAMP AS VARCHAR)) >= 22",
+ currentTimestamp().cast(Types.STRING).charLength() >= 12,
+ "currentTimestamp().cast(STRING).charLength() >= 12",
+ "CHAR_LENGTH(CAST(CURRENT_TIMESTAMP AS VARCHAR)) >= 12",
"true")
testAllApis(
- localTimestamp().cast(Types.STRING).charLength() >= 22,
- "localTimestamp().cast(STRING).charLength() >= 22",
- "CHAR_LENGTH(CAST(LOCALTIMESTAMP AS VARCHAR)) >= 22",
+ localTimestamp().cast(Types.STRING).charLength() >= 12,
+ "localTimestamp().cast(STRING).charLength() >= 12",
+ "CHAR_LENGTH(CAST(LOCALTIMESTAMP AS VARCHAR)) >= 12",
"true")
testAllApis(
- localTime().cast(Types.STRING).charLength(),
- "localTime().cast(STRING).charLength()",
- "CHAR_LENGTH(CAST(LOCALTIME AS VARCHAR))",
- "8")
+ localTime().cast(Types.STRING).charLength() >= 5,
+ "localTime().cast(STRING).charLength() >= 5",
+ "CHAR_LENGTH(CAST(LOCALTIME AS VARCHAR)) >= 5",
+ "true")
// comparisons are deterministic
testAllApis(