Polishing and fixed broken support for @IfProfileValue in AbstractJpaTests (even though it's deprecated).
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user