Skip to content

Commit

Permalink
0000770: Improve DbImport so that it incorporates the SymmetricDS dat…
Browse files Browse the repository at this point in the history
…a loader
  • Loading branch information
chenson42 committed Aug 12, 2012
1 parent f79bb2a commit 61d1dba
Showing 1 changed file with 18 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
import org.jumpmind.db.sql.DmlStatement;
import org.jumpmind.db.sql.DmlStatement.DmlType;
import org.jumpmind.db.sql.ISqlTemplate;
import org.jumpmind.db.sql.SqlException;
import org.jumpmind.symmetric.DbExport.Compatible;
import org.jumpmind.symmetric.DbExport.Format;
import org.jumpmind.symmetric.service.impl.AbstractServiceTest;
Expand Down Expand Up @@ -171,13 +172,24 @@ public void importSqlData() throws Exception {

assertCountDbImportTableRecords(5);

// TODO test error

// TODO test replace

// TODO test ignore
recreateImportTable();

assertCountDbImportTableRecords(0);

// TODO test force
try {
importCsv.importTables(getClass()
.getResourceAsStream("/test-dbimport-1-bad-line-2.sql"));
Assert.fail("Expected a sql exception");
} catch (SqlException ex) {
}

assertCountDbImportTableRecords(0);

importCsv.setCommitRate(1);
importCsv.setForceImport(true);
importCsv.importTables(getClass()
.getResourceAsStream("/test-dbimport-1-bad-line-2.sql"));
assertCountDbImportTableRecords(4);

}

Expand Down

0 comments on commit 61d1dba

Please sign in to comment.