Github user zentol commented on a diff in the pull request:

    https://github.com/apache/flink/pull/1885#discussion_r59725309
  
    --- Diff: 
flink-batch-connectors/flink-jdbc/src/test/java/org/apache/flink/api/java/io/jdbc/JDBCInputFormatTest.java
 ---
    @@ -58,54 +52,39 @@ public static void setUpClass() {
     
        private static void prepareDerbyDatabase() throws 
ClassNotFoundException, SQLException {
                System.setProperty("derby.stream.error.field", 
"org.apache.flink.api.java.io.jdbc.DerbyUtil.DEV_NULL");
    -           String dbURL = "jdbc:derby:memory:ebookshop;create=true";
    -           Class.forName("org.apache.derby.jdbc.EmbeddedDriver");
    -           conn = DriverManager.getConnection(dbURL);
    +           Class.forName(JDBCExample.DRIVER_CLASS);
    +           conn = 
DriverManager.getConnection(JDBCExample.DB_URL+";create=true");
                createTable();
                insertDataToSQLTable();
                conn.close();
        }
     
        private static void createTable() throws SQLException {
    -           StringBuilder sqlQueryBuilder = new StringBuilder("CREATE TABLE 
books (");
    -           sqlQueryBuilder.append("id INT NOT NULL DEFAULT 0,");
    -           sqlQueryBuilder.append("title VARCHAR(50) DEFAULT NULL,");
    -           sqlQueryBuilder.append("author VARCHAR(50) DEFAULT NULL,");
    -           sqlQueryBuilder.append("price FLOAT DEFAULT NULL,");
    -           sqlQueryBuilder.append("qty INT DEFAULT NULL,");
    -           sqlQueryBuilder.append("PRIMARY KEY (id))");
    -
                Statement stat = conn.createStatement();
    -           stat.executeUpdate(sqlQueryBuilder.toString());
    +           stat.executeUpdate(JDBCExample.getCreateQuery());
    --- End diff --
    
    maybe I'm overthinking this, but in my opinion a change to an example 
shouldn't have an effect on a test. that's why I'd rather keep them separated.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

Reply via email to