Fix test environment for webapp test
authorCherian Mathew <c.mathew@bgbm.org>
Mon, 16 Nov 2015 14:11:09 +0000 (15:11 +0100)
committerCherian Mathew <c.mathew@bgbm.org>
Mon, 16 Nov 2015 14:12:05 +0000 (15:12 +0100)
eu.etaxonomy.taxeditor.test/src/test/java/eu/etaxonomy/taxeditor/httpinvoker/BaseRemotingTest.java
eu.etaxonomy.taxeditor.test/src/test/java/eu/etaxonomy/taxeditor/httpinvoker/TestConfig.java
eu.etaxonomy.taxeditor.test/src/test/resources/.cdmLibrary/writableResources/cdm.datasources.xml
eu.etaxonomy.taxeditor.webapp/lib/cdmlib-remote-webapp.war [deleted file]

index 177638d..99396b4 100644 (file)
@@ -14,7 +14,6 @@ import java.util.Map;
 import net.sf.ehcache.CacheManager;
 
 import org.apache.log4j.Logger;
-import org.junit.Assert;
 import org.junit.BeforeClass;
 import org.springframework.security.authentication.UsernamePasswordAuthenticationToken;
 import org.springframework.security.core.Authentication;
@@ -34,7 +33,6 @@ import eu.etaxonomy.taxeditor.remoting.cache.CdmRemoteCacheManager;
 import eu.etaxonomy.taxeditor.remoting.cache.CdmTransientEntityCacher;
 import eu.etaxonomy.taxeditor.remoting.source.CdmPersistentRemoteSource;
 import eu.etaxonomy.taxeditor.remoting.source.CdmRemoteSource;
-import eu.etaxonomy.taxeditor.remoting.source.CdmRemoteSourceException;
 import eu.etaxonomy.taxeditor.remoting.source.ICdmRemoteSource;
 import eu.etaxonomy.taxeditor.session.CdmEntitySession;
 import eu.etaxonomy.taxeditor.session.ICdmEntitySessionEnabled;
@@ -101,11 +99,7 @@ public abstract class BaseRemotingTest extends ThreadedTest {
                         null);
         CdmApplicationState.setCurrentAppConfig(remoteApplicationController);
         CdmApplicationState.setCdmServiceCacher(new CdmServiceCacher());
-        try {
-            remotePersistentSource = CdmPersistentRemoteSource.NewInstance(sourceName);
-        } catch (CdmRemoteSourceException e) {
-            Assert.fail("Default Remote Persistent Source failed to load. Reason : " + e.getMessage());
-        }
+
         cdmEntitySessionManager = getRemoteApplicationController().getCdmEntitySessionManager();
 
         CdmApplicationState.setCurrentDataChangeService(new CdmDataChangeService());
index 4e28075..4f6598d 100644 (file)
@@ -27,7 +27,7 @@ import org.unitils.UnitilsJUnit4;
  * @date 11 Nov 2015
  *
  */
-public class TestConfig extends UnitilsJUnit4 {
+public abstract class TestConfig extends UnitilsJUnit4 {
 
     private static final Logger logger = Logger.getLogger(TestConfig.class);
 
index a7dbcd7..be23b82 100644 (file)
@@ -1,5 +1,6 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:context="http://www.springframework.org/schema/context" xsi:schemaLocation="http://www.springframework.org/schema/beans      http://www.springframework.org/schema/beans/spring-beans-2.5.xsd     http://www.springframework.org/schema/context     http://www.springframework.org/schema/context/spring-context-2.5.xsd">ls 
+<beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:context="http://www.springframework.org/schema/context" xsi:schemaLocation="http://www.springframework.org/schema/beans      http://www.springframework.org/schema/beans/spring-beans-2.5.xsd     http://www.springframework.org/schema/context     http://www.springframework.org/schema/context/spring-context-2.5.xsd">
+  ls
   <bean id="cdmTestDataSource" class="eu.etaxonomy.cdm.database.LocalH2" lazy-init="true">
     <property name="driverClassName" value="org.h2.Driver" />
     <property name="url" value="jdbc:h2:file:./target/classes/h2/cdmTest;AUTO_SERVER=TRUE" />
diff --git a/eu.etaxonomy.taxeditor.webapp/lib/cdmlib-remote-webapp.war b/eu.etaxonomy.taxeditor.webapp/lib/cdmlib-remote-webapp.war
deleted file mode 100644 (file)
index 2e93af3..0000000
Binary files a/eu.etaxonomy.taxeditor.webapp/lib/cdmlib-remote-webapp.war and /dev/null differ