Index: src/test/java/org/openmrs/api/db/SerializedObjectDAOTest.java =================================================================== --- src/test/java/org/openmrs/api/db/SerializedObjectDAOTest.java (revision 17590) +++ src/test/java/org/openmrs/api/db/SerializedObjectDAOTest.java (working copy) @@ -27,15 +27,12 @@ import org.openmrs.report.ReportSchema; import org.openmrs.test.BaseContextSensitiveTest; import org.openmrs.test.StartModule; -import org.openmrs.test.StartModuleExecutionListener; import org.openmrs.test.Verifies; -import org.springframework.test.annotation.DirtiesContext; /** * This class tests the {@link SerializedObjectDAO} linked to from the Context. Currently that file * is the {@link HibernateSerializedObjectDAO}. */ -// The @StartModule also requires @DirtiesContext on last method in class @StartModule( { "org/openmrs/api/db/include/serialization.xstream-0.1.1.omod" }) public class SerializedObjectDAOTest extends BaseContextSensitiveTest { @@ -141,15 +138,4 @@ assertEquals(1, l.size()); } - /** - * Must be the last method in this class so that the next class gets a clean spring app context - * - * @see StartModuleExecutionListener - * @see StartModule - */ - @DirtiesContext - @Test - public void shouldMarkContextAsDirty() { - // this is a dummy test just so the @DirtiesContext annotation is the last method - } } Index: src/test/java/org/openmrs/module/ModuleInteroperabilityTest.java =================================================================== --- src/test/java/org/openmrs/module/ModuleInteroperabilityTest.java (revision 17590) +++ src/test/java/org/openmrs/module/ModuleInteroperabilityTest.java (working copy) @@ -21,7 +21,6 @@ import org.openmrs.test.SkipBaseSetup; import org.openmrs.test.StartModule; import org.openmrs.util.OpenmrsClassLoader; -import org.springframework.test.annotation.DirtiesContext; /** * Tests how modules interact and call each other. Both when loaded by Spring during OpenMRS startup @@ -64,16 +63,4 @@ } - /** - * Must be the last method in this class so that the next class gets a clean spring app context - * - * @see StartModuleExecutionListener - * @see StartModule - */ - @DirtiesContext - @Test - public void shouldMarkContextAsDirty() { - // this is a dummy test just so the @DirtiesContext annotation is the last method - } - } Index: src/test/java/org/openmrs/test/StartModuleExecutionListener.java =================================================================== --- src/test/java/org/openmrs/test/StartModuleExecutionListener.java (revision 17590) +++ src/test/java/org/openmrs/test/StartModuleExecutionListener.java (working copy) @@ -19,22 +19,19 @@ import org.junit.Assert; import org.openmrs.api.context.Context; import org.openmrs.api.db.SerializedObjectDAOTest; -import org.openmrs.module.Module; -import org.openmrs.module.ModuleClassLoader; import org.openmrs.module.ModuleConstants; import org.openmrs.module.ModuleFactory; import org.openmrs.module.ModuleInteroperabilityTest; import org.openmrs.module.ModuleUtil; -import org.springframework.context.support.ClassPathXmlApplicationContext; +import org.springframework.beans.factory.xml.XmlBeanDefinitionReader; +import org.springframework.context.support.GenericApplicationContext; +import org.springframework.core.io.ClassPathResource; import org.springframework.test.context.TestContext; import org.springframework.test.context.support.AbstractTestExecutionListener; /** - * To use this annotation: - *