Skip to content

Commit

Permalink
IGNITE-7626 Unify code in test which clean up persistence directories -
Browse files Browse the repository at this point in the history
Fixes #3512.

Signed-off-by: Alexey Goncharuk <alexey.goncharuk@gmail.com>
  • Loading branch information
EdShangGG authored and agoncharuk committed Feb 12, 2018
1 parent a0997b9 commit 6f6f8dd
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -154,8 +154,8 @@ public class IgniteMassLoadSandboxTest extends GridCommonAbstractTest {
@Override protected void beforeTest() throws Exception {
stopAllGrids();

deleteRecursively(U.resolveWorkDirectory(U.defaultWorkDirectory(), "db", false));
deleteRecursively(U.resolveWorkDirectory(U.defaultWorkDirectory(), "temp", false));
U.delete(U.resolveWorkDirectory(U.defaultWorkDirectory(), "db", false));
U.delete(U.resolveWorkDirectory(U.defaultWorkDirectory(), "temp", false));
}

/** {@inheritDoc} */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ private DataStorageConfiguration createDbConfig() {
@Override protected void beforeTestsStarted() throws Exception {
super.beforeTestsStarted();

deleteWorkFiles();
cleanPersistenceDir();
}

/** {@inheritDoc} */
Expand All @@ -89,7 +89,7 @@ private DataStorageConfiguration createDbConfig() {

stopAllGrids();

deleteWorkFiles();
cleanPersistenceDir();
}

/**
Expand Down Expand Up @@ -151,11 +151,4 @@ private void checkCacheSizes(Ignite client) {
}
}
}

/**
* @throws IgniteCheckedException If fail.
*/
private void deleteWorkFiles() throws IgniteCheckedException {
deleteRecursively(U.resolveWorkDirectory(U.defaultWorkDirectory(), DFLT_STORE_DIR, false));
}
}

0 comments on commit 6f6f8dd

Please sign in to comment.