Polishing and fixed broken support for @IfProfileValue in AbstractJpaTests (even though it's deprecated).

This commit is contained in:
Sam Brannen
2011-03-28 17:23:48 +00:00
parent d6be4c5a2a
commit 726564c84d
6 changed files with 47 additions and 5 deletions

View File

@@ -70,7 +70,7 @@ public abstract class ConditionalTestCase extends TestCase {
// getName will return the name of the method being run
if (isDisabledInThisEnvironment(getName())) {
recordDisabled();
this.logger.info("**** " + getClass().getName() + "." + getName() + " disabled in this environment: "
this.logger.info("**** " + getClass().getName() + "." + getName() + " is disabled in this environment: "
+ "Total disabled tests = " + getDisabledTestCount());
return;
}

View File

@@ -143,6 +143,7 @@ public abstract class AbstractAnnotationAwareTransactionalTests extends
*/
@Override
public void runBare() throws Throwable {
// getName will return the name of the method being run.
if (isDisabledInThisEnvironment(getName())) {
// Let superclass log that we didn't run the test.
@@ -154,7 +155,7 @@ public abstract class AbstractAnnotationAwareTransactionalTests extends
if (isDisabledInThisEnvironment(testMethod)) {
recordDisabled();
this.logger.info("**** " + getClass().getName() + "." + getName() + " disabled in this environment: "
this.logger.info("**** " + getClass().getName() + "." + getName() + " is disabled in this environment: "
+ "Total disabled tests=" + getDisabledTestCount());
return;
}

View File

@@ -163,6 +163,23 @@ public abstract class AbstractJpaTests extends AbstractAnnotationAwareTransactio
@Override
@SuppressWarnings({ "rawtypes", "unchecked" })
public void runBare() throws Throwable {
// getName will return the name of the method being run.
if (isDisabledInThisEnvironment(getName())) {
// Let superclass log that we didn't run the test.
super.runBare();
return;
}
final Method testMethod = getTestMethod();
if (isDisabledInThisEnvironment(testMethod)) {
recordDisabled();
this.logger.info("**** " + getClass().getName() + "." + getName() + " is disabled in this environment: "
+ "Total disabled tests=" + getDisabledTestCount());
return;
}
if (!shouldUseShadowLoader()) {
super.runBare();
return;