Re-enable and document @Ignore'd tests

Documented why static nested test cases in the spring-test module are
ignored, explaining that such "TestCase classes are run manually by the
enclosing test class". Prior to the migration to Gradle (i.e., with
Spring Build), these tests would not have been picked up by the test
suite since they end with a "TestCase" suffix instead of "Test" or
"Tests".

Re-enabled HibernateMultiEntityManagerFactoryIntegrationTests.

For the remaining tests that were disabled as a result of the migration
to Gradle, comments have been added to the @Ignore declarations.

Issue: SPR-8116, SPR-9398
This commit is contained in:
Sam Brannen
2012-12-05 10:31:31 +01:00
parent d12fbcc7ce
commit 025d111efc
12 changed files with 46 additions and 34 deletions

View File

@@ -16,7 +16,7 @@
package org.springframework.test.context.junit38;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.*;
import java.util.Arrays;
import java.util.Collection;
@@ -24,6 +24,7 @@ import java.util.Collection;
import junit.framework.TestCase;
import junit.framework.TestResult;
import org.junit.Ignore;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.junit.runners.Parameterized;
@@ -104,7 +105,7 @@ public class FailingBeforeAndAfterMethodsTests {
}
}
@org.junit.Ignore // TODO SPR-8116
@Ignore("TestCase classes are run manually by the enclosing test class")
@SuppressWarnings("deprecation")
@TestExecutionListeners(listeners = AlwaysFailingBeforeTestMethodTestExecutionListener.class, inheritListeners = false)
public static class AlwaysFailingBeforeTestMethodTestCase extends AbstractJUnit38SpringContextTests {
@@ -113,7 +114,7 @@ public class FailingBeforeAndAfterMethodsTests {
}
}
@org.junit.Ignore // TODO SPR-8116
@Ignore("TestCase classes are run manually by the enclosing test class")
@SuppressWarnings("deprecation")
@TestExecutionListeners(listeners = AlwaysFailingAfterTestMethodTestExecutionListener.class, inheritListeners = false)
public static class AlwaysFailingAfterTestMethodTestCase extends AbstractJUnit38SpringContextTests {
@@ -122,7 +123,7 @@ public class FailingBeforeAndAfterMethodsTests {
}
}
@org.junit.Ignore // TODO SPR-8116
@Ignore("TestCase classes are run manually by the enclosing test class")
@SuppressWarnings("deprecation")
@ContextConfiguration("FailingBeforeAndAfterMethodsTests-context.xml")
public static class FailingBeforeTransactionalTestCase extends AbstractTransactionalJUnit38SpringContextTests {
@@ -136,7 +137,7 @@ public class FailingBeforeAndAfterMethodsTests {
}
}
@org.junit.Ignore // TODO SPR-8116
@Ignore("TestCase classes are run manually by the enclosing test class")
@SuppressWarnings("deprecation")
@ContextConfiguration("FailingBeforeAndAfterMethodsTests-context.xml")
public static class FailingAfterTransactionalTestCase extends AbstractTransactionalJUnit38SpringContextTests {

View File

@@ -16,10 +16,11 @@
package org.springframework.test.context.junit4;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.*;
import java.util.ArrayList;
import org.junit.Ignore;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.junit.runner.notification.RunNotifier;
@@ -59,7 +60,7 @@ public class ExpectedExceptionSpringRunnerTests {
}
@org.junit.Ignore // TODO SPR-8116
@Ignore("TestCase classes are run manually by the enclosing test class")
@RunWith(SpringJUnit4ClassRunner.class)
@TestExecutionListeners({})
public static final class ExpectedExceptionSpringRunnerTestCase {

View File

@@ -16,12 +16,12 @@
package org.springframework.test.context.junit4;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.fail;
import static org.junit.Assert.*;
import java.util.Arrays;
import java.util.Collection;
import org.junit.Ignore;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.junit.runner.notification.RunNotifier;
@@ -146,32 +146,32 @@ public class FailingBeforeAndAfterMethodsTests {
}
}
@org.junit.Ignore // TODO SPR-8116
@Ignore("TestCase classes are run manually by the enclosing test class")
@TestExecutionListeners(AlwaysFailingBeforeTestClassTestExecutionListener.class)
public static class AlwaysFailingBeforeTestClassTestCase extends BaseTestCase {
}
@org.junit.Ignore // TODO SPR-8116
@Ignore("TestCase classes are run manually by the enclosing test class")
@TestExecutionListeners(AlwaysFailingAfterTestClassTestExecutionListener.class)
public static class AlwaysFailingAfterTestClassTestCase extends BaseTestCase {
}
@org.junit.Ignore // TODO SPR-8116
@Ignore("TestCase classes are run manually by the enclosing test class")
@TestExecutionListeners(AlwaysFailingPrepareTestInstanceTestExecutionListener.class)
public static class AlwaysFailingPrepareTestInstanceTestCase extends BaseTestCase {
}
@org.junit.Ignore // TODO SPR-8116
@Ignore("TestCase classes are run manually by the enclosing test class")
@TestExecutionListeners(AlwaysFailingBeforeTestMethodTestExecutionListener.class)
public static class AlwaysFailingBeforeTestMethodTestCase extends BaseTestCase {
}
@org.junit.Ignore // TODO SPR-8116
@Ignore("TestCase classes are run manually by the enclosing test class")
@TestExecutionListeners(AlwaysFailingAfterTestMethodTestExecutionListener.class)
public static class AlwaysFailingAfterTestMethodTestCase extends BaseTestCase {
}
@org.junit.Ignore // TODO SPR-8116
@Ignore("TestCase classes are run manually by the enclosing test class")
@ContextConfiguration("FailingBeforeAndAfterMethodsTests-context.xml")
public static class FailingBeforeTransactionTestCase extends AbstractTransactionalJUnit4SpringContextTests {
@@ -185,7 +185,7 @@ public class FailingBeforeAndAfterMethodsTests {
}
}
@org.junit.Ignore // TODO SPR-8116
@Ignore("TestCase classes are run manually by the enclosing test class")
@ContextConfiguration("FailingBeforeAndAfterMethodsTests-context.xml")
public static class FailingAfterTransactionTestCase extends AbstractTransactionalJUnit4SpringContextTests {

View File

@@ -16,13 +16,14 @@
package org.springframework.test.context.junit4;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.*;
import java.io.IOException;
import java.util.Arrays;
import java.util.Collection;
import java.util.concurrent.atomic.AtomicInteger;
import org.junit.Ignore;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.junit.runner.notification.RunNotifier;
@@ -100,7 +101,7 @@ public class RepeatedSpringRunnerTests {
@RunWith(SpringJUnit4ClassRunner.class)
@TestExecutionListeners( {})
@TestExecutionListeners({})
public abstract static class AbstractRepeatedTestCase {
protected void incrementInvocationCount() throws IOException {
@@ -151,8 +152,7 @@ public class RepeatedSpringRunnerTests {
* href="http://jira.springframework.org/browse/SPR-6011"
* target="_blank">SPR-6011</a>.
*/
@org.junit.Ignore // TODO SPR-8116 causing timeouts on cbeams' (otherwise fast) MBP.
// Timeouts are 2x-4x their expected range. Something seems wrong indeed.
@Ignore("TestCase classes are run manually by the enclosing test class")
public static final class TimedRepeatedTestCase extends AbstractRepeatedTestCase {
@Test

View File

@@ -16,8 +16,9 @@
package org.springframework.test.context.junit4;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.*;
import org.junit.Ignore;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.junit.runner.notification.RunNotifier;
@@ -56,10 +57,9 @@ public class TimedSpringRunnerTests {
}
@org.junit.Ignore // TODO SPR-8116 causing timeouts on cbeams' (otherwise fast) MBP.
// Timeouts are 2x-5x their expected range. Something seems wrong indeed.
@Ignore("TestCase classes are run manually by the enclosing test class")
@RunWith(SpringJUnit4ClassRunner.class)
@TestExecutionListeners( {})
@TestExecutionListeners({})
public static final class TimedSpringRunnerTestCase {
// Should Pass.

View File

@@ -1,3 +0,0 @@
TODO SPR-8116 re-enable TestNG support for spring-test
These TestNG test classes are currently not run at all.

View File

@@ -0,0 +1,3 @@
TODO [SPR-9398] re-enable TestNG support for spring-test.
These TestNG test classes are currently not run at all.