code.onehippo.org is currently readonly. We are migrating to code.bloomreach.com, please continue working there on Monday 14/12. See: https://docs.bloomreach.com/display/engineering/GitLab

Commit ffb7b9a6 authored by Ard Schrijvers's avatar Ard Schrijvers

REPO-1811 Better tearDown

Make sure tearDown with clearing the repository still removes
also the database entries because if they are kept, consequent runs can fail
parent e209d242
......@@ -70,6 +70,11 @@ public abstract class AbstractLockManagerTest extends RepositoryTestCase {
@Override
@After
public void tearDown() throws Exception {
tearDown(false);
}
@Override
public void tearDown(boolean clearRepository) throws Exception {
lockManager.clear();
// DELETE ALL ROWS if there are any present
if (dataSource != null) {
......@@ -81,7 +86,7 @@ public abstract class AbstractLockManagerTest extends RepositoryTestCase {
fail("Failed to delete rows : " + e.toString());
}
}
super.tearDown();
super.tearDown(clearRepository);
}
protected void dbRowAssertion(final String key, final String expectedStatus) throws SQLException {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment