Skip to content
Snippets Groups Projects
Commit 84581f69 authored by anttil's avatar anttil
Browse files

BIS-51 / SP-139: Cleaning up tests

SVN: 25942
parent e1783e4c
No related branches found
No related tags found
No related merge requests found
...@@ -42,8 +42,6 @@ import ch.systemsx.cisd.openbis.systemtest.base.BaseTest; ...@@ -42,8 +42,6 @@ import ch.systemsx.cisd.openbis.systemtest.base.BaseTest;
* *
* @author anttil * @author anttil
*/ */
@Test(groups =
{ "system-cleandb", "basic" })
public class EntityRelationshipChangeTest extends BaseTest public class EntityRelationshipChangeTest extends BaseTest
{ {
...@@ -363,5 +361,4 @@ public class EntityRelationshipChangeTest extends BaseTest ...@@ -363,5 +361,4 @@ public class EntityRelationshipChangeTest extends BaseTest
commonServer.updateSample(session, updates); commonServer.updateSample(session, updates);
} }
} }
...@@ -38,8 +38,6 @@ import ch.systemsx.cisd.openbis.systemtest.base.BaseTest; ...@@ -38,8 +38,6 @@ import ch.systemsx.cisd.openbis.systemtest.base.BaseTest;
/** /**
* @author anttil * @author anttil
*/ */
@Test(groups =
{ "system-cleandb", "stub-relationship-service" })
@ContextConfiguration(locations = @ContextConfiguration(locations =
{ "classpath:stub_relationship_service.xml" }, inheritLocations = true) { "classpath:stub_relationship_service.xml" }, inheritLocations = true)
public class RelationshipServiceAuthorizationTest extends BaseTest public class RelationshipServiceAuthorizationTest extends BaseTest
......
...@@ -27,14 +27,12 @@ import java.util.List; ...@@ -27,14 +27,12 @@ import java.util.List;
import javax.servlet.http.HttpSession; import javax.servlet.http.HttpSession;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.support.GenericApplicationContext;
import org.springframework.mock.web.MockHttpServletRequest; import org.springframework.mock.web.MockHttpServletRequest;
import org.springframework.mock.web.MockMultipartFile; import org.springframework.mock.web.MockMultipartFile;
import org.springframework.test.context.ContextConfiguration; import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.testng.AbstractTransactionalTestNGSpringContextTests; import org.springframework.test.context.testng.AbstractTransactionalTestNGSpringContextTests;
import org.springframework.test.context.transaction.TransactionConfiguration; import org.springframework.test.context.transaction.TransactionConfiguration;
import org.testng.AssertJUnit; import org.testng.AssertJUnit;
import org.testng.annotations.AfterTest;
import org.testng.annotations.BeforeClass; import org.testng.annotations.BeforeClass;
import org.testng.annotations.BeforeSuite; import org.testng.annotations.BeforeSuite;
...@@ -95,13 +93,6 @@ public abstract class SystemTestCase extends AbstractTransactionalTestNGSpringCo ...@@ -95,13 +93,6 @@ public abstract class SystemTestCase extends AbstractTransactionalTestNGSpringCo
TestInitializer.init(); TestInitializer.init();
} }
@AfterTest()
public void testingThis()
{
System.out.println("!!!!!!!! AFTER TEST RUN - DESTROYING - IN SYSTEMTESTCASE!!!");
((GenericApplicationContext) applicationContext).destroy();
}
@BeforeClass @BeforeClass
public void loginAsSystem() public void loginAsSystem()
{ {
......
...@@ -28,6 +28,7 @@ import org.springframework.test.context.transaction.TransactionConfiguration; ...@@ -28,6 +28,7 @@ import org.springframework.test.context.transaction.TransactionConfiguration;
import org.testng.annotations.AfterTest; import org.testng.annotations.AfterTest;
import org.testng.annotations.BeforeClass; import org.testng.annotations.BeforeClass;
import org.testng.annotations.BeforeTest; import org.testng.annotations.BeforeTest;
import org.testng.annotations.Test;
import ch.systemsx.cisd.authentication.ISessionManager; import ch.systemsx.cisd.authentication.ISessionManager;
import ch.systemsx.cisd.common.logging.LogInitializer; import ch.systemsx.cisd.common.logging.LogInitializer;
...@@ -62,6 +63,8 @@ import ch.systemsx.cisd.openbis.plugin.generic.shared.IGenericServer; ...@@ -62,6 +63,8 @@ import ch.systemsx.cisd.openbis.plugin.generic.shared.IGenericServer;
*/ */
@ContextConfiguration(locations = "classpath:applicationContext.xml") @ContextConfiguration(locations = "classpath:applicationContext.xml")
@TransactionConfiguration(transactionManager = "transaction-manager") @TransactionConfiguration(transactionManager = "transaction-manager")
@Test(groups =
{ "system-cleandb" })
public abstract class BaseTest extends AbstractTransactionalTestNGSpringContextTests public abstract class BaseTest extends AbstractTransactionalTestNGSpringContextTests
{ {
...@@ -133,7 +136,6 @@ public abstract class BaseTest extends AbstractTransactionalTestNGSpringContextT ...@@ -133,7 +136,6 @@ public abstract class BaseTest extends AbstractTransactionalTestNGSpringContextT
{ "system-cleandb" }) { "system-cleandb" })
public void testingThis() public void testingThis()
{ {
System.out.println("!!!!!!!! AFTER TEST RUN - DESTROYING!!!");
((GenericApplicationContext) applicationContext).destroy(); ((GenericApplicationContext) applicationContext).destroy();
} }
...@@ -144,6 +146,7 @@ public abstract class BaseTest extends AbstractTransactionalTestNGSpringContextT ...@@ -144,6 +146,7 @@ public abstract class BaseTest extends AbstractTransactionalTestNGSpringContextT
} }
@Autowired @Autowired
@Test(enabled = false)
public final void setRequestContextProvider(final SpringRequestContextProvider contextProvider) public final void setRequestContextProvider(final SpringRequestContextProvider contextProvider)
{ {
request = new MockHttpServletRequest(); request = new MockHttpServletRequest();
...@@ -151,49 +154,56 @@ public abstract class BaseTest extends AbstractTransactionalTestNGSpringContextT ...@@ -151,49 +154,56 @@ public abstract class BaseTest extends AbstractTransactionalTestNGSpringContextT
} }
@Autowired @Autowired
@Test(enabled = false)
public void setDaoFactory(IDAOFactory daoFactory) public void setDaoFactory(IDAOFactory daoFactory)
{ {
this.daoFactory = daoFactory; this.daoFactory = daoFactory;
} }
@Autowired @Autowired
@Test(enabled = false)
public final void setCommonServer(final ICommonServerForInternalUse commonServer) public final void setCommonServer(final ICommonServerForInternalUse commonServer)
{ {
this.commonServer = commonServer; this.commonServer = commonServer;
} }
@Autowired @Autowired
@Test(enabled = false)
public final void setGenericServer(final IGenericServer genericServer) public final void setGenericServer(final IGenericServer genericServer)
{ {
this.genericServer = genericServer; this.genericServer = genericServer;
} }
@Autowired @Autowired
@Test(enabled = false)
public final void setCommonClientService(final ICommonClientService commonClientService) public final void setCommonClientService(final ICommonClientService commonClientService)
{ {
this.commonClientService = commonClientService; this.commonClientService = commonClientService;
} }
@Autowired @Autowired
@Test(enabled = false)
public final void setGenericClientService(final IGenericClientService genericClientService) public final void setGenericClientService(final IGenericClientService genericClientService)
{ {
this.genericClientService = genericClientService; this.genericClientService = genericClientService;
} }
@Autowired @Autowired
@Test(enabled = false)
public void setETLService(IETLLIMSService etlService) public void setETLService(IETLLIMSService etlService)
{ {
this.etlService = etlService; this.etlService = etlService;
} }
@Autowired @Autowired
@Test(enabled = false)
public void setRelationshipService(final IRelationshipService relationshipService) public void setRelationshipService(final IRelationshipService relationshipService)
{ {
this.relationshipService = relationshipService; this.relationshipService = relationshipService;
} }
@Autowired @Autowired
@Test(enabled = false)
public void setSessionManager(final ISessionManager<Session> sessionManager) public void setSessionManager(final ISessionManager<Session> sessionManager)
{ {
this.sessionManager = sessionManager; this.sessionManager = sessionManager;
......
...@@ -11,20 +11,6 @@ ...@@ -11,20 +11,6 @@
</classes> </classes>
</test> </test>
<!-- test name="system-cleandb-basic" annotations="JDK">
<method-selectors>
<method-selector>
<script language="beanshell"><![CDATA[
groups.containsKey("system-cleandb") && groups.containsKey("basic")
]]></script>
</method-selector>
</method-selectors>
<packages>
<package name="ch.systemsx.cisd.openbis.*" />
</packages>
</test -->
<test name="system-cleandb-stub-relationship-service" annotations="JDK"> <test name="system-cleandb-stub-relationship-service" annotations="JDK">
<classes> <classes>
<class name="ch.systemsx.cisd.openbis.systemtest.RelationshipServiceAuthorizationTest" /> <class name="ch.systemsx.cisd.openbis.systemtest.RelationshipServiceAuthorizationTest" />
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment