return;
} else {
conn.close();
}
DBSetup dbsetup = new DBSetup(getTestDatabaseConnectionUrl(db), getTestDatabaseConnectionUsername(db),
getTestDatabaseConnectionPassword(db), false);
try {
dbsetup.setup("small-dbsetup.xml");
conn = getConnection(db);
DatabaseType dbtype = DatabaseTypeFactory.getDatabaseType(conn);
assert dbtype.checkTableExists(conn, "TEST_SMALL");
assert dbtype.checkColumnExists(conn, "TEST_SMALL", "ID");
assert dbtype.checkColumnExists(conn, "TEST_SMALL", "MYLONG");
assert dbtype.checkColumnExists(conn, "TEST_SMALL", "MYBIGDEC");
assert dbtype.checkColumnExists(conn, "TEST_SMALL", "MYLONGVARCHAR");
assert dbtype.checkColumnExists(conn, "TEST_SMALL", "MYDOUBLE");
assert dbtype.checkColumnExists(conn, "TEST_SMALL", "MYBOOLEAN");
assert dbtype.checkColumnExists(conn, "TEST_SMALL", "MYBYTES");
assert dbtype.checkColumnExists(conn, "TEST_SMALL", "MYVARCHAR2");
assert dbtype.checkColumnExists(conn, "TEST_SMALL", "MYCLOB");
assert dbtype.checkColumnExists(conn, "TEST_SMALL", "MYBLOB");
assert dbtype.checkColumnExists(conn, "TEST_SMALL", "MYCHAR");
assert dbtype.checkColumnExists(conn, "TEST_SMALL", "MYSMALLINT");
assert dbtype.checkColumnExists(conn, "TEST_SMALL", "MYTIMESTAMP");
ResultSet results = conn.prepareCall("SELECT MYVARCHAR2 FROM TEST_SMALL").executeQuery();
results.next();
assert "abc-myvarchar2".equals(results.getString("MYVARCHAR2"));
results.close();
} finally {
try {
dbsetup.uninstall("small-dbsetup.xml");
} catch (Exception e) {
System.err.println("Cannot uninstall the test schema");
}
}