Browse Source

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
pull/198/head
Sam Brannen 12 years ago
parent
commit
025d111efc
  1. 4
      spring-beans/src/test/java/org/springframework/beans/factory/support/security/CallbacksSecurityTests.java
  2. 1
      spring-orm/src/test/java/org/springframework/orm/jpa/hibernate/HibernateMultiEntityManagerFactoryIntegrationTests.java
  3. 5
      spring-orm/src/test/java/org/springframework/orm/jpa/openjpa/OpenJpaEntityManagerFactoryWithAspectJWeavingIntegrationTests.java
  4. 5
      spring-orm/src/test/java/org/springframework/orm/jpa/toplink/TopLinkMultiEntityManagerFactoryIntegrationTests.java
  5. 11
      spring-test/src/test/java/org/springframework/test/context/junit38/FailingBeforeAndAfterMethodsTests.java
  6. 5
      spring-test/src/test/java/org/springframework/test/context/junit4/ExpectedExceptionSpringRunnerTests.java
  7. 18
      spring-test/src/test/java/org/springframework/test/context/junit4/FailingBeforeAndAfterMethodsTests.java
  8. 8
      spring-test/src/test/java/org/springframework/test/context/junit4/RepeatedSpringRunnerTests.java
  9. 8
      spring-test/src/test/java/org/springframework/test/context/junit4/TimedSpringRunnerTests.java
  10. 3
      spring-test/src/test/java/org/springframework/test/context/testng/SPR-8116.txt
  11. 3
      spring-test/src/test/java/org/springframework/test/context/testng/SPR-9398.txt
  12. 9
      spring-web/src/test/java/org/springframework/remoting/jaxws/JaxWsSupportTests.java

4
spring-beans/src/test/java/org/springframework/beans/factory/support/security/CallbacksSecurityTests.java

@ -436,7 +436,9 @@ public class CallbacksSecurityTests { @@ -436,7 +436,9 @@ public class CallbacksSecurityTests {
}
@Test
@Ignore // TODO SPR-8116 passes under Eclipse, but fails under Gradle with https://gist.github.com/1664133
@Ignore("passes under Eclipse, but fails under Gradle with https://gist.github.com/1664133")
// TODO SPR-8116 passes under Eclipse, but fails under Gradle with
// https://gist.github.com/1664133
public void testContainerPrivileges() throws Exception {
AccessControlContext acc = provider.getAccessControlContext();

1
spring-orm/src/test/java/org/springframework/orm/jpa/hibernate/HibernateMultiEntityManagerFactoryIntegrationTests.java

@ -26,7 +26,6 @@ import org.springframework.orm.jpa.AbstractContainerEntityManagerFactoryIntegrat @@ -26,7 +26,6 @@ import org.springframework.orm.jpa.AbstractContainerEntityManagerFactoryIntegrat
*
* @author Juergen Hoeller
*/
@org.junit.Ignore // TODO SPR-8116 work out JPA 1 vs 2 classpath issues in spring-orm
public class HibernateMultiEntityManagerFactoryIntegrationTests extends
AbstractContainerEntityManagerFactoryIntegrationTests {

5
spring-orm/src/test/java/org/springframework/orm/jpa/openjpa/OpenJpaEntityManagerFactoryWithAspectJWeavingIntegrationTests.java

@ -16,17 +16,20 @@ @@ -16,17 +16,20 @@
package org.springframework.orm.jpa.openjpa;
import org.junit.Ignore;
/**
* Test that AspectJ weaving (in particular the currently shipped aspects) work with JPA (see SPR-3873 for more details).
*
* @author Ramnivas Laddad
*/
@org.junit.Ignore // TODO SPR-8116 this test causes gradle to hang.
// TODO SPR-8116 this test causes gradle to hang.
// when run independently e.g. `./gradlew :spring-orm:test -Dtest.single=OpenJpaEntity...`
// it works fine. When run together with all other tests e.g. `./gradlew :spring-orm:test`
// it hangs on the 'testCanSerializeProxies' test method. Note that this test DOES pass in
// Eclipse, even when the entire 'spring-orm' module is run. Run gradle with '-i' to
// get more details when reproducing the hanging test.
@Ignore("this test causes gradle to hang")
public class OpenJpaEntityManagerFactoryWithAspectJWeavingIntegrationTests extends OpenJpaEntityManagerFactoryIntegrationTests {
protected String[] getConfigLocations() {

5
spring-orm/src/test/java/org/springframework/orm/jpa/toplink/TopLinkMultiEntityManagerFactoryIntegrationTests.java

@ -19,6 +19,7 @@ package org.springframework.orm.jpa.toplink; @@ -19,6 +19,7 @@ package org.springframework.orm.jpa.toplink;
import javax.persistence.EntityManager;
import javax.persistence.EntityManagerFactory;
import org.junit.Ignore;
import org.springframework.orm.jpa.AbstractContainerEntityManagerFactoryIntegrationTests;
/**
@ -26,13 +27,15 @@ import org.springframework.orm.jpa.AbstractContainerEntityManagerFactoryIntegrat @@ -26,13 +27,15 @@ import org.springframework.orm.jpa.AbstractContainerEntityManagerFactoryIntegrat
*
* @author Costin Leau
*/
@org.junit.Ignore // TODO SPR-8116 this test causes gradle to hang. See OJEMFWAJWIT.
// TODO SPR-8116 this test causes gradle to hang. See OJEMFWAJWIT.
@Ignore("this test causes gradle to hang. See OJEMFWAJWIT.")
public class TopLinkMultiEntityManagerFactoryIntegrationTests extends
AbstractContainerEntityManagerFactoryIntegrationTests {
private EntityManagerFactory entityManagerFactory2;
@SuppressWarnings("deprecation")
public TopLinkMultiEntityManagerFactoryIntegrationTests() {
setAutowireMode(AUTOWIRE_BY_NAME);
}

11
spring-test/src/test/java/org/springframework/test/context/junit38/FailingBeforeAndAfterMethodsTests.java

@ -16,7 +16,7 @@ @@ -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; @@ -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 { @@ -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 { @@ -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 { @@ -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 { @@ -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 {

5
spring-test/src/test/java/org/springframework/test/context/junit4/ExpectedExceptionSpringRunnerTests.java

@ -16,10 +16,11 @@ @@ -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 { @@ -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 {

18
spring-test/src/test/java/org/springframework/test/context/junit4/FailingBeforeAndAfterMethodsTests.java

@ -16,12 +16,12 @@ @@ -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 { @@ -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 { @@ -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 {

8
spring-test/src/test/java/org/springframework/test/context/junit4/RepeatedSpringRunnerTests.java

@ -16,13 +16,14 @@ @@ -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 { @@ -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 { @@ -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

8
spring-test/src/test/java/org/springframework/test/context/junit4/TimedSpringRunnerTests.java

@ -16,8 +16,9 @@ @@ -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 { @@ -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.

3
spring-test/src/test/java/org/springframework/test/context/testng/SPR-8116.txt

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

3
spring-test/src/test/java/org/springframework/test/context/testng/SPR-9398.txt

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

9
spring-web/src/test/java/org/springframework/remoting/jaxws/JaxWsSupportTests.java

@ -16,8 +16,11 @@ @@ -16,8 +16,11 @@
package org.springframework.remoting.jaxws;
import static org.junit.Assert.*;
import java.net.MalformedURLException;
import java.net.URL;
import javax.xml.namespace.QName;
import javax.xml.ws.BindingProvider;
import javax.xml.ws.Service;
@ -25,9 +28,8 @@ import javax.xml.ws.WebServiceClient; @@ -25,9 +28,8 @@ import javax.xml.ws.WebServiceClient;
import javax.xml.ws.WebServiceRef;
import javax.xml.ws.soap.AddressingFeature;
import static org.junit.Assert.*;
import org.junit.Ignore;
import org.junit.Test;
import org.springframework.beans.factory.BeanCreationException;
import org.springframework.beans.factory.support.GenericBeanDefinition;
import org.springframework.beans.factory.support.RootBeanDefinition;
@ -38,7 +40,8 @@ import org.springframework.context.support.GenericApplicationContext; @@ -38,7 +40,8 @@ import org.springframework.context.support.GenericApplicationContext;
* @author Juergen Hoeller
* @since 2.5
*/
@org.junit.Ignore // TODO SPR-8116 - see https://gist.github.com/1150858
// TODO SPR-8116 - see https://gist.github.com/1150858
@Ignore("see https://gist.github.com/1150858")
public class JaxWsSupportTests {
@Test

Loading…
Cancel
Save