Skip to content

Commit

Permalink
verwijder deprecated API calls in test klassen
Browse files Browse the repository at this point in the history
  • Loading branch information
mprins committed Nov 12, 2019
1 parent 74ca6ae commit 884eca5
Show file tree
Hide file tree
Showing 27 changed files with 36 additions and 51 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@

/datamodel/referentiedata/*.zip
/datamodel/referentiedata/*.qg*
/TOP*.zip

# maven release procedure files
**/pom.xml.tag
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ public void setUp() throws Exception {
public void cleanup() throws Exception {
brmo.closeBrmoFramework();

CleanUtil.cleanSTAGING(staging);
CleanUtil.cleanSTAGING(staging, false);
staging.close();

CleanUtil.cleanRSGB_BRK(rsgb, true);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ public void setUp() throws Exception {
@After
public void cleanup() throws Exception {
brmo.closeBrmoFramework();
CleanUtil.cleanSTAGING(staging);
CleanUtil.cleanSTAGING(staging, false);
staging.close();
sequential.unlock();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ public void setUp() throws Exception {
public void cleanup() throws Exception {
brmo.closeBrmoFramework();

CleanUtil.cleanSTAGING(staging);
CleanUtil.cleanSTAGING(staging, false);
staging.close();

CleanUtil.cleanRSGB_BRK(rsgb, true);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
import nl.b3p.brmo.loader.entity.Bericht;
import nl.b3p.brmo.loader.BrmoFramework;
import nl.b3p.brmo.loader.util.BrmoException;
import nl.b3p.brmo.test.util.database.dbunit.CleanUtil;
import nl.b3p.loader.jdbc.OracleConnectionUnwrapper;
import org.apache.commons.dbcp.BasicDataSource;
import org.dbunit.database.DatabaseConfig;
Expand Down Expand Up @@ -97,10 +98,7 @@ public void setUp() throws Exception {
@After
public void cleanup() throws Exception {
brmo.closeBrmoFramework();
DatabaseOperation.DELETE_ALL.execute(staging, new DefaultDataSet(new DefaultTable[]{
new DefaultTable("laadproces"),
new DefaultTable("bericht")
}));
CleanUtil.cleanSTAGING(staging, false);
staging.close();

sequential.unlock();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ public void setUp() throws Exception {
public void cleanup() throws Exception {
brmo.closeBrmoFramework();

CleanUtil.cleanSTAGING(staging);
CleanUtil.cleanSTAGING(staging, false);
staging.close();

CleanUtil.cleanRSGB_BRK(rsgb, true);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ public void setUp() throws Exception {
@After
public void cleanup() throws Exception {
brmo.closeBrmoFramework();
CleanUtil.cleanSTAGING(staging);
CleanUtil.cleanSTAGING(staging, false);
CleanUtil.cleanRSGB_BAG(rsgb, true);
CleanUtil.cleanRSGB_BRP(rsgb);
staging.close();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ public void setUp() throws Exception {
public void cleanup() throws Exception {
brmo.closeBrmoFramework();

CleanUtil.cleanSTAGING(staging);
CleanUtil.cleanSTAGING(staging, false);
staging.close();

CleanUtil.cleanRSGB_NHR(rsgb);
Expand Down Expand Up @@ -151,6 +151,7 @@ public void testNhrXMLToStagingToRsgb() throws Exception {

private void checkWaarde(String tabelNaam, String kolom) throws DataSetException, SQLException {
ITable tabel = rsgb.createDataSet().getTable(tabelNaam);
LOG.info("check " + tabelNaam + ":" + kolom);
for (int i = 0; i < tabel.getRowCount(); i++) {
assertFalse("kolom " + kolom + " van tabel " + tabelNaam + " bevat quote", tabel.getValue(i, kolom).toString().contains("'"));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ public void cleanup() throws Exception {
CleanUtil.cleanRSGB_BRK(rsgb, true);
rsgb.close();

CleanUtil.cleanSTAGING(staging);
CleanUtil.cleanSTAGING(staging, false);
staging.close();

sequential.unlock();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -159,9 +159,7 @@ public void cleanup() throws Exception {
CleanUtil.cleanRSGB_BRK(rsgb, true);
rsgb.close();

DatabaseOperation.DELETE_ALL.execute(staging, new DefaultDataSet(new DefaultTable[]{
new DefaultTable("job")}
));
CleanUtil.cleanSTAGING(staging, false);
staging.close();

try {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ public void cleanup() throws Exception {
CleanUtil.cleanRSGB_BRK(rsgb, true);
rsgb.close();

CleanUtil.cleanSTAGING(staging);
CleanUtil.cleanSTAGING(staging, false);
staging.close();

sequential.unlock();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -114,12 +114,10 @@ public void setUp() throws Exception {
public void cleanup() throws Exception {
brmo.closeBrmoFramework();

CleanUtil.cleanRSGB(rsgb);
CleanUtil.cleanRSGB_BRK(rsgb, true);
rsgb.close();

DatabaseOperation.DELETE_ALL.execute(staging, new DefaultDataSet(new DefaultTable[]{
new DefaultTable("job")}
));
CleanUtil.cleanSTAGING(staging, false);
staging.close();

sequential.unlock();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -157,14 +157,11 @@ public void cleanup() throws Exception {
// in geval van niet waar gemaakte assumptions
brmo.closeBrmoFramework();
}
assumeTrue("Deze test werkt niet met de jTDS driver omdat die geen JtdsPreparedStatement#setNull() methode heeft.", !this.isMsSQL);

CleanUtil.cleanRSGB(rsgb);
CleanUtil.cleanRSGB_BRK(rsgb,true);
rsgb.close();

DatabaseOperation.DELETE_ALL.execute(staging, new DefaultDataSet(new DefaultTable[]{
new DefaultTable("job")}
));
CleanUtil.cleanSTAGING(staging, false);
staging.close();

try {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ public void cleanup() throws Exception {
brmo.closeBrmoFramework();

CleanUtil.cleanRSGB_BRK(rsgb, true);
CleanUtil.cleanSTAGING(staging);
CleanUtil.cleanSTAGING(staging, false);
rsgb.close();
staging.close();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ public void cleanup() throws Exception {
CleanUtil.cleanRSGB_BRK(rsgb, true);
rsgb.close();

CleanUtil.cleanSTAGING(staging);
CleanUtil.cleanSTAGING(staging, false);
staging.close();

sequential.unlock();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ public void setUp() throws Exception {
public void cleanup() throws Exception {
brmo.closeBrmoFramework();

CleanUtil.cleanSTAGING(staging);
CleanUtil.cleanSTAGING(staging, false);
staging.close();

CleanUtil.cleanRSGB_NHR(rsgb);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -168,10 +168,7 @@ public void cleanup() throws Exception {
}

if (staging != null) {
CleanUtil.cleanSTAGING(staging);
DatabaseOperation.DELETE_ALL.execute(staging, new DefaultDataSet(new DefaultTable[]{
new DefaultTable("job")}
));
CleanUtil.cleanSTAGING(staging, false);
staging.close();
}

Expand Down
2 changes: 1 addition & 1 deletion brmo-loader/src/test/java/nl/b3p/TopNLIntegrationTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ public void setUp() throws Exception {
public void cleanup() throws Exception {
brmo.closeBrmoFramework();

CleanUtil.cleanSTAGING(staging);
CleanUtil.cleanSTAGING(staging, false);
staging.close();

topnl.close();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ public void setUp() throws Exception {
public void cleanup() throws Exception {
brmo.closeBrmoFramework();

CleanUtil.cleanSTAGING(staging);
CleanUtil.cleanSTAGING(staging, false);
staging.close();

CleanUtil.cleanRSGB_BRK(rsgb, true);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ public void cleanup() throws Exception {
CleanUtil.cleanRSGB_BRK(rsgb, true);
rsgb.close();

CleanUtil.cleanSTAGING(staging);
CleanUtil.cleanSTAGING(staging, false);
staging.close();

sequential.unlock();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ public void setUp() throws Exception {
public void cleanup() throws Exception {
brmo.closeBrmoFramework();

CleanUtil.cleanSTAGING(staging);
CleanUtil.cleanSTAGING(staging, false);
staging.close();

CleanUtil.cleanRSGB_BAG(rsgb, true);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -122,10 +122,7 @@ public void cleanup() throws Exception {
}

if (staging != null) {
CleanUtil.cleanSTAGING(staging);
DatabaseOperation.DELETE_ALL.execute(staging, new DefaultDataSet(new DefaultTable[]{
new DefaultTable("job")}
));
CleanUtil.cleanSTAGING(staging, false);
staging.close();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ public void setUp() throws Exception {
} else {
fail("Geen ondersteunde database aangegegeven");
}
setupJNDI(dsRsgb, dsStaging);
setupJNDI(dsRsgb, dsStaging, null, null);

FlatXmlDataSetBuilder fxdb = new FlatXmlDataSetBuilder();
fxdb.setCaseSensitiveTableNames(false);
Expand Down Expand Up @@ -160,10 +160,8 @@ public void cleanup() throws Exception {
}

if (staging != null) {
CleanUtil.cleanSTAGING(staging);
if (staging != null) {
CleanUtil.cleanSTAGING(staging, true);
staging.close();
}
}
try {
sequential.unlock();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ public void setUp() throws Exception {
} else {
fail("Geen ondersteunde database aangegegeven");
}
setupJNDI(dsRsgb, dsStaging);
setupJNDI(dsRsgb, dsStaging, null, null);

FlatXmlDataSetBuilder fxdb = new FlatXmlDataSetBuilder();
fxdb.setCaseSensitiveTableNames(false);
Expand Down Expand Up @@ -182,7 +182,7 @@ public void cleanup() throws Exception {
rsgb.close();
}
if (staging != null) {
CleanUtil.cleanSTAGING(staging);
CleanUtil.cleanSTAGING(staging, true);
staging.close();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ public void setUp() throws Exception {
} else {
fail("Geen ondersteunde database aangegegeven");
}
setupJNDI(dsRsgb, dsStaging);
setupJNDI(dsRsgb, dsStaging, null, null);

FlatXmlDataSetBuilder fxdb = new FlatXmlDataSetBuilder();
fxdb.setCaseSensitiveTableNames(false);
Expand Down Expand Up @@ -185,7 +185,7 @@ public void cleanup() throws Exception {
rsgb.close();
}
if (staging != null) {
CleanUtil.cleanSTAGING(staging);
CleanUtil.cleanSTAGING(staging, true);
staging.close();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ public void setUp() throws Exception {
staging.getConfig().setProperty(DatabaseConfig.FEATURE_ALLOW_EMPTY_FIELDS, true);
rsgb.getConfig().setProperty(DatabaseConfig.FEATURE_ALLOW_EMPTY_FIELDS, true);

setupJNDI(dsRsgb, dsStaging);
setupJNDI(dsRsgb, dsStaging, null, null);

FlatXmlDataSetBuilder fxdb = new FlatXmlDataSetBuilder();
fxdb.setCaseSensitiveTableNames(false);
Expand Down Expand Up @@ -166,7 +166,7 @@ public void cleanup() throws Exception {
rsgb.close();
}
if (staging != null) {
CleanUtil.cleanSTAGING(staging);
CleanUtil.cleanSTAGING(staging, true);
staging.close();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ public void setUp() throws Exception {

staging.getConfig().setProperty(DatabaseConfig.FEATURE_ALLOW_EMPTY_FIELDS, true);
rsgb.getConfig().setProperty(DatabaseConfig.FEATURE_ALLOW_EMPTY_FIELDS, true);
setupJNDI(dsRsgb, dsStaging);
setupJNDI(dsRsgb, dsStaging, null, null);

FlatXmlDataSetBuilder fxdb = new FlatXmlDataSetBuilder();
fxdb.setCaseSensitiveTableNames(false);
Expand Down Expand Up @@ -161,7 +161,7 @@ public void cleanup() throws Exception {
rsgb.close();
}
if (staging != null) {
CleanUtil.cleanSTAGING(staging);
CleanUtil.cleanSTAGING(staging, true);
staging.close();
}

Expand Down

0 comments on commit 884eca5

Please sign in to comment.