This is an automated email from the ASF dual-hosted git repository.

chesnay pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/flink.git


The following commit(s) were added to refs/heads/master by this push:
     new a639488  [FLINK-12316][jdbc] Relax assertions
a639488 is described below

commit a6394884e2706f15f60cb64a5dcb1106cb9c822e
Author: Chesnay Schepler <[email protected]>
AuthorDate: Wed Apr 24 13:48:03 2019 +0200

    [FLINK-12316][jdbc] Relax assertions
---
 .../test/java/org/apache/flink/api/java/io/jdbc/JDBCFullTest.java    | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git 
a/flink-connectors/flink-jdbc/src/test/java/org/apache/flink/api/java/io/jdbc/JDBCFullTest.java
 
b/flink-connectors/flink-jdbc/src/test/java/org/apache/flink/api/java/io/jdbc/JDBCFullTest.java
index 51d39b2..91b175d 100644
--- 
a/flink-connectors/flink-jdbc/src/test/java/org/apache/flink/api/java/io/jdbc/JDBCFullTest.java
+++ 
b/flink-connectors/flink-jdbc/src/test/java/org/apache/flink/api/java/io/jdbc/JDBCFullTest.java
@@ -35,6 +35,8 @@ import java.sql.ResultSet;
 import java.sql.Statement;
 import java.sql.Types;
 
+import static org.hamcrest.core.StringContains.containsString;
+
 /**
  * Tests using both {@link JDBCInputFormat} and {@link JDBCOutputFormat}.
  */
@@ -53,8 +55,7 @@ public class JDBCFullTest extends JDBCTestBase {
        @Test
        public void testEnrichedClassCastException() throws Exception {
                exception.expect(ClassCastException.class);
-               exception.expectMessage(
-                       "java.lang.String cannot be cast to java.lang.Double, 
field index: 3, field value: 11.11.");
+               exception.expectMessage(containsString("field index: 3, field 
value: 11.11."));
 
                JDBCOutputFormat jdbcOutputFormat = 
JDBCOutputFormat.buildJDBCOutputFormat()
                        .setDrivername(JDBCTestBase.DRIVER_CLASS)

Reply via email to