#843 - Change ServerConfig name to default to "db" (prior default was null) and defaultServer to true

This commit is contained in:
Rob Bygrave
2016-10-31 20:40:26 +13:00
parent ea5e9fa75a
commit e9ad459fa5
3 changed files with 6 additions and 3 deletions
@@ -75,7 +75,7 @@ public class ServerConfig {
/**
* The EbeanServer name.
*/
private String name;
private String name = "db";
/**
* Typically configuration type objects that are passed by this ServerConfig
@@ -105,7 +105,7 @@ public class ServerConfig {
/**
* Set to true if this is the default/primary server.
*/
private boolean defaultServer;
private boolean defaultServer = true;
/**
* Set this to true to disable class path search.
@@ -563,7 +563,7 @@ public class ServerConfig {
}
/**
* Set true if this EbeanServer should be registered as the "default" server
* Set false if you do not want this EbeanServer to be registered as the "default" server
* with the Ebean singleton.
* <p>
* This is only used when {@link #setRegister(boolean)} is also true.
@@ -14,6 +14,7 @@ public class DbMigrationConfigTest {
ServerConfig config = new ServerConfig();
config.setName("h2other");
config.loadFromProperties();
config.setDefaultServer(false);
DbMigrationConfig migrationConfig = config.getMigrationConfig();
@@ -46,6 +46,8 @@ public class TestPersistenceContextServerConfig extends BaseTestCase {
config.loadFromProperties(properties);
config.setPersistenceContextScope(PersistenceContextScope.QUERY);
config.setContainerConfig(new ContainerConfig());
config.setDefaultServer(false);
config.setRegister(false);
// DataSourceConfig dataSourceConfig = new DataSourceConfig();
// dataSourceConfig.setUsername("sa");