Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactored some test stuff. Removed unused code.
- Loading branch information
Showing
7 changed files
with
40 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
26 changes: 26 additions & 0 deletions
26
symmetric/src/test/java/org/jumpmind/symmetric/test/AbstractTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
package org.jumpmind.symmetric.test; | ||
|
||
import org.apache.log4j.Level; | ||
import org.apache.log4j.Logger; | ||
import org.jumpmind.symmetric.load.csv.CsvLoader; | ||
import org.jumpmind.symmetric.service.impl.DataLoaderService; | ||
import org.jumpmind.symmetric.service.impl.RouterService; | ||
|
||
abstract public class AbstractTest { | ||
|
||
protected Level setLoggingLevelForTest(Level level) { | ||
Level old = Logger.getLogger(getClass()).getLevel(); | ||
Logger.getLogger(DataLoaderService.class).setLevel(level); | ||
Logger.getLogger(RouterService.class).setLevel(level); | ||
Logger.getLogger(CsvLoader.class).setLevel(level); | ||
return old; | ||
} | ||
|
||
protected void logTestRunning() { | ||
Logger.getLogger(getClass()).info("Running " + new Exception().getStackTrace()[1].getMethodName() + ". " | ||
+ printDatabases()); | ||
} | ||
|
||
abstract protected String printDatabases(); | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters