mirror of
https://github.com/ebean-orm/ebean.git
synced 2026-10-24 03:57:45 +00:00
ENH: Abort all tests if connection to db could not be esablished (#1099)
This commit is contained in:
committed by
Rob Bygrave
parent
4c8e1113bf
commit
c00febd95b
@@ -16,9 +16,16 @@ public class BaseTestCase {
|
||||
|
||||
static {
|
||||
logger.debug("... preStart");
|
||||
if (!AgentLoader.loadAgentFromClasspath("ebean-agent", "debug=1;packages=org.tests,org.avaje.test,io.ebean")) {
|
||||
if (!AgentLoader.loadAgentFromClasspath("ebean-agent", "debug=1")) {
|
||||
logger.info("avaje-ebeanorm-agent not found in classpath - not dynamically loaded");
|
||||
}
|
||||
try {
|
||||
// First try, if we get the default server. If this fails, all tests will fail.
|
||||
Ebean.getDefaultServer();
|
||||
} catch (Throwable e) {
|
||||
logger.error("Fatal error while getting ebean-server. Exiting...", e);
|
||||
System.exit(1);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user