#1892 - Refactor change internal use of Ebean to DB

This commit is contained in:
rob bygrave
2019-12-13 14:17:05 +13:00
parent 502b20be67
commit 5cd74bc468
14 changed files with 65 additions and 66 deletions
+3 -3
View File
@@ -70,7 +70,7 @@ public abstract class BaseTestCase {
}
try {
// First try, if we get the default server. If this fails, all tests will fail.
Ebean.getDefaultServer();
DB.getDefault();
} catch (Throwable e) {
logger.error("Fatal error while getting ebean-server. Exiting...", e);
System.exit(1);
@@ -239,7 +239,7 @@ public abstract class BaseTestCase {
}
protected SpiEbeanServer spiEbeanServer() {
return (SpiEbeanServer) Ebean.getDefaultServer();
return (SpiEbeanServer) DB.getDefault();
}
protected EbeanServer server() {
@@ -248,7 +248,7 @@ public abstract class BaseTestCase {
protected void loadCountryCache() {
Ebean.find(Country.class)
DB.find(Country.class)
.setBeanCacheMode(CacheMode.PUT)
.findList();
}
@@ -37,7 +37,7 @@ public class ConditionalTestRunner extends BlockJUnit4ClassRunner {
}
private boolean platformMath(Platform[] platforms) {
Platform current = Ebean.getDefaultServer().getPluginApi().getDatabasePlatform().getPlatform();
Platform current = DB.getDefault().getPluginApi().getDatabasePlatform().getPlatform();
for (Platform p : platforms) {
if (p.equals(current)) {
return true;