src/test/java/org/embulk/output/db2/DB2OutputPluginTest.java in embulk-output-db2-0.7.0 vs src/test/java/org/embulk/output/db2/DB2OutputPluginTest.java in embulk-output-db2-0.7.1

- old
+ new

@@ -30,11 +30,11 @@ tester.addPlugin(OutputPlugin.class, "db2", DB2OutputPlugin.class); try { Class.forName("com.ibm.db2.jcc.DB2Driver"); } catch (ClassNotFoundException e) { - System.err.println("Warning: you should put 'db2jcc4.jar' in 'embulk-input-db2/driver' directory in order to test."); + System.err.println("Warning: you should put 'db2jcc4.jar' in 'embulk-output-db2/driver' directory in order to test."); return; } try { connect(); @@ -127,10 +127,14 @@ } @Test public void testInsertCreateNumber() throws Exception { + if (!enabled) { + return; + } + String table = "TEST_NUMBER"; dropTable(table); test("/db2/yml/test-insert-number.yml"); @@ -361,10 +365,14 @@ assertNumberTable(table, 1); } private void assertNumberTable(String table, int skip) throws SQLException { + if (!enabled) { + return; + } + List<List<Object>> rows = select(table); assertEquals(skip + 3, rows.size()); { List<Object> row = rows.get(skip + 0); assertEquals("A001", row.get(0)); @@ -408,10 +416,14 @@ assertCharTable(table, trimming, 1); } private void assertCharTable(String table, boolean trimming, int skip) throws SQLException { + if (!enabled) { + return; + } + List<List<Object>> rows = select(table); assertEquals(skip + 3, rows.size()); { List<Object> row = rows.get(skip + 0); assertEquals("A001", row.get(0)); @@ -455,9 +467,13 @@ assertDateTimeTable(table, 1); } private void assertDateTimeTable(String table, int skip) throws SQLException, ParseException { + if (!enabled) { + return; + } + List<List<Object>> rows = select(table); assertEquals(skip + 3, rows.size()); { List<Object> row = rows.get(skip + 0); assertEquals("A001", row.get(0));