mirror of
https://github.com/ebean-orm/ebean.git
synced 2024-04-21 10:51:47 +00:00
#1892 - Refactor change internal use of Ebean to DB
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user