You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ode.apache.org by bo...@apache.org on 2008/12/17 00:23:57 UTC
svn commit: r727213 - in /ode/branches/APACHE_ODE_1.X: ./
axis2-war/src/test/java/org/apache/ode/axis2/
axis2-war/src/test/java/org/apache/ode/axis2/correlation/
axis2-war/src/test/java/org/apache/ode/axis2/httpbinding/
axis2-war/src/test/java/org/apac...
Author: boisvert
Date: Tue Dec 16 15:23:57 2008
New Revision: 727213
URL: http://svn.apache.org/viewvc?rev=727213&view=rev
Log:
ODE-463: improve rakefile to enable testing with different dbms
Modified:
ode/branches/APACHE_ODE_1.X/Rakefile
ode/branches/APACHE_ODE_1.X/axis2-war/src/test/java/org/apache/ode/axis2/Axis2TestBase.java
ode/branches/APACHE_ODE_1.X/axis2-war/src/test/java/org/apache/ode/axis2/EndpointConfigurationTest.java
ode/branches/APACHE_ODE_1.X/axis2-war/src/test/java/org/apache/ode/axis2/EndpointTimeoutsTest.java
ode/branches/APACHE_ODE_1.X/axis2-war/src/test/java/org/apache/ode/axis2/MessageStructureTest.java
ode/branches/APACHE_ODE_1.X/axis2-war/src/test/java/org/apache/ode/axis2/ServiceFaultCatchTest.java
ode/branches/APACHE_ODE_1.X/axis2-war/src/test/java/org/apache/ode/axis2/SoapHeaderTest.java
ode/branches/APACHE_ODE_1.X/axis2-war/src/test/java/org/apache/ode/axis2/XSDReferencesDeployTest.java
ode/branches/APACHE_ODE_1.X/axis2-war/src/test/java/org/apache/ode/axis2/correlation/CorrelationJoinHibTest.java
ode/branches/APACHE_ODE_1.X/axis2-war/src/test/java/org/apache/ode/axis2/correlation/CorrelationJoinLazyHibTest.java
ode/branches/APACHE_ODE_1.X/axis2-war/src/test/java/org/apache/ode/axis2/correlation/CorrelationJoinLazyTest.java
ode/branches/APACHE_ODE_1.X/axis2-war/src/test/java/org/apache/ode/axis2/correlation/CorrelationJoinTest.java
ode/branches/APACHE_ODE_1.X/axis2-war/src/test/java/org/apache/ode/axis2/correlation/CorrelationMultiHibTest.java
ode/branches/APACHE_ODE_1.X/axis2-war/src/test/java/org/apache/ode/axis2/correlation/CorrelationMultiTest.java
ode/branches/APACHE_ODE_1.X/axis2-war/src/test/java/org/apache/ode/axis2/httpbinding/HttpBindingTest.java
ode/branches/APACHE_ODE_1.X/axis2-war/src/test/java/org/apache/ode/axis2/instancecleanup/CleanFailureTest.java
ode/branches/APACHE_ODE_1.X/axis2-war/src/test/java/org/apache/ode/axis2/instancecleanup/CleanFaultHibTest.java
ode/branches/APACHE_ODE_1.X/axis2-war/src/test/java/org/apache/ode/axis2/instancecleanup/CleanFaultTest.java
ode/branches/APACHE_ODE_1.X/axis2-war/src/test/java/org/apache/ode/axis2/instancecleanup/CleanSuccessHibTest.java
ode/branches/APACHE_ODE_1.X/axis2-war/src/test/java/org/apache/ode/axis2/instancecleanup/CleanSuccessTest.java
ode/branches/APACHE_ODE_1.X/axis2-war/src/test/java/org/apache/ode/axis2/instancecleanup/CleanTestBase.java
ode/branches/APACHE_ODE_1.X/axis2-war/src/test/java/org/apache/ode/axis2/management/RetireTest.java
ode/branches/APACHE_ODE_1.X/axis2-war/src/test/java/org/apache/ode/dao/ProcessInstanceProfileDAO.java
ode/branches/APACHE_ODE_1.X/axis2-war/src/test/java/org/apache/ode/dao/ProcessProfileDAO.java
Modified: ode/branches/APACHE_ODE_1.X/Rakefile
URL: http://svn.apache.org/viewvc/ode/branches/APACHE_ODE_1.X/Rakefile?rev=727213&r1=727212&r2=727213&view=diff
==============================================================================
--- ode/branches/APACHE_ODE_1.X/Rakefile (original)
+++ ode/branches/APACHE_ODE_1.X/Rakefile Tue Dec 16 15:23:57 2008
@@ -213,6 +213,8 @@
test.setup unzip(_("target/test-classes/webapp/WEB-INF")=>project("dao-jpa-ojpa-derby").package(:zip))
test.setup unzip(_("target/test-classes/webapp/WEB-INF")=>project("dao-hibernate-db").package(:zip))
+ NativeDB.prepare_configs test, _(".")
+
test.setup task(:prepare_rampart_policy_test) do |task|
# test_dir will be the Axis2 Repo dir
test_dir = _("target/test-classes/TestRampartPolicy")
@@ -453,6 +455,8 @@
build concat(_("target/#{db}.sql")=>[ predefined_for[db], partial ])
end
+ NativeDB.create_dbs self, _("."), :hib
+
package(:zip).include(derby_db)
end
@@ -486,6 +490,9 @@
JAVAX.transaction, LOG4J, OPENJPA, XERCES, WSDL4J
build derby_db
+
+ NativeDB.create_dbs self, _("."), :jpa
+
package(:zip).include(derby_db)
end
Modified: ode/branches/APACHE_ODE_1.X/axis2-war/src/test/java/org/apache/ode/axis2/Axis2TestBase.java
URL: http://svn.apache.org/viewvc/ode/branches/APACHE_ODE_1.X/axis2-war/src/test/java/org/apache/ode/axis2/Axis2TestBase.java?rev=727213&r1=727212&r2=727213&view=diff
==============================================================================
--- ode/branches/APACHE_ODE_1.X/axis2-war/src/test/java/org/apache/ode/axis2/Axis2TestBase.java (original)
+++ ode/branches/APACHE_ODE_1.X/axis2-war/src/test/java/org/apache/ode/axis2/Axis2TestBase.java Tue Dec 16 15:23:57 2008
@@ -16,6 +16,8 @@
import org.apache.ode.tools.sendsoap.cline.HttpSoapSender;
import org.testng.annotations.AfterMethod;
import org.testng.annotations.BeforeMethod;
+import org.testng.annotations.DataProvider;
+
import javax.servlet.ServletException;
import javax.wsdl.WSDLException;
@@ -29,8 +31,10 @@
import java.net.URI;
import java.net.URISyntaxException;
import java.net.URL;
+import java.util.ArrayList;
import java.util.Collection;
import java.util.Iterator;
+import java.util.List;
/**
* @author Matthieu Riou <mr...@apache.org>
@@ -43,7 +47,60 @@
protected ODEAxis2Server server;
- public void startServer() throws Exception {
+ protected String config;
+
+ private static final String DO_NOT_OVERRIDE_CONFIG = "<DO_NOT_OVERRIDE_CONFIG>";
+
+ @DataProvider(name = "configs")
+ protected Iterator<Object[]> createConfigData() {
+ List<String> configDirList = new ArrayList<String>();
+ if( !(this instanceof ODEConfigDirAware) || ((ODEConfigDirAware)this).getODEConfigDir().contains("hib")) {
+ addToConfigDirList(configDirList, "org.apache.ode.jpadbs");
+ }
+ if( !(this instanceof ODEConfigDirAware) || !((ODEConfigDirAware)this).getODEConfigDir().contains("hib")) {
+ addToConfigDirList(configDirList, "org.apache.ode.hibdbs");
+ }
+
+ if( configDirList.isEmpty() ) {
+ // if no system property is set, fall back to default
+ System.out.println("WARNING: No Java system properties have been set to override ode configuration, using default.");
+ if( this instanceof ODEConfigDirAware ) {
+ configDirList.add(((ODEConfigDirAware)this).getODEConfigDir());
+ } else {
+ configDirList.add(DO_NOT_OVERRIDE_CONFIG);
+ }
+ }
+
+ final Iterator<String> itr = configDirList.iterator();
+ return new Iterator<Object[]>() {
+ public boolean hasNext() {
+ return itr.hasNext();
+ }
+
+ public Object[] next() {
+ config = itr.next();
+ return new Object[] {};
+ }
+
+ public void remove() {
+ }
+ };
+ }
+
+ private void addToConfigDirList(List<String> configDirList, String propertyKey) {
+ String dbs = System.getProperty(propertyKey);
+ if( dbs != null ) {
+ String[] configDirs = dbs.split(",");
+ for( String configDir : configDirs ) {
+ String trimmed = configDir.trim();
+ if( trimmed.length() > 0 ) {
+ configDirList.add(trimmed);
+ }
+ }
+ }
+ }
+
+ public void startServer() throws Exception {
startServer("webapp/WEB-INF", "webapp/WEB-INF/conf/axis2.xml");
}
@@ -59,12 +116,19 @@
server.stop();
}
- @BeforeMethod
+ @BeforeMethod
protected void setUp() throws Exception {
- startServer();
+ if( config == null || DO_NOT_OVERRIDE_CONFIG.equals(config) ) {
+ System.out.println("Using default config.");
+ } else {
+ System.out.println("Using config: " + config + ".");
+ System.setProperty("org.apache.ode.configDir", config);
+ }
+
+ startServer();
}
- @AfterMethod
+ @AfterMethod
protected void tearDown() throws Exception {
stopServer();
}
Modified: ode/branches/APACHE_ODE_1.X/axis2-war/src/test/java/org/apache/ode/axis2/EndpointConfigurationTest.java
URL: http://svn.apache.org/viewvc/ode/branches/APACHE_ODE_1.X/axis2-war/src/test/java/org/apache/ode/axis2/EndpointConfigurationTest.java?rev=727213&r1=727212&r2=727213&view=diff
==============================================================================
--- ode/branches/APACHE_ODE_1.X/axis2-war/src/test/java/org/apache/ode/axis2/EndpointConfigurationTest.java (original)
+++ ode/branches/APACHE_ODE_1.X/axis2-war/src/test/java/org/apache/ode/axis2/EndpointConfigurationTest.java Tue Dec 16 15:23:57 2008
@@ -33,9 +33,7 @@
*
*/
public class EndpointConfigurationTest extends Axis2TestBase {
-
-
- @Test
+ @Test(dataProvider="configs")
public void testEndpointProperties() throws Exception {
executeProcess();
}
@@ -68,7 +66,7 @@
* Redo the exact same test but with Basic Authentication activated on the external service
* @throws Exception
*/
- @Test
+ @Test(dataProvider="configs")
public void testHttpAuthentication() throws Exception {
ContextHandler securedEchoContext;
{
@@ -95,6 +93,4 @@
}
executeProcess(securedEchoContext);
}
-
-
}
Modified: ode/branches/APACHE_ODE_1.X/axis2-war/src/test/java/org/apache/ode/axis2/EndpointTimeoutsTest.java
URL: http://svn.apache.org/viewvc/ode/branches/APACHE_ODE_1.X/axis2-war/src/test/java/org/apache/ode/axis2/EndpointTimeoutsTest.java?rev=727213&r1=727212&r2=727213&view=diff
==============================================================================
--- ode/branches/APACHE_ODE_1.X/axis2-war/src/test/java/org/apache/ode/axis2/EndpointTimeoutsTest.java (original)
+++ ode/branches/APACHE_ODE_1.X/axis2-war/src/test/java/org/apache/ode/axis2/EndpointTimeoutsTest.java Tue Dec 16 15:23:57 2008
@@ -13,8 +13,7 @@
*
*/
public class EndpointTimeoutsTest extends Axis2TestBase {
-
- @Test
+ @Test(dataProvider="configs")
public void testTimeouts() throws Exception {
String bundleName = "TestEndpointTimeouts";
// deploy the required service
Modified: ode/branches/APACHE_ODE_1.X/axis2-war/src/test/java/org/apache/ode/axis2/MessageStructureTest.java
URL: http://svn.apache.org/viewvc/ode/branches/APACHE_ODE_1.X/axis2-war/src/test/java/org/apache/ode/axis2/MessageStructureTest.java?rev=727213&r1=727212&r2=727213&view=diff
==============================================================================
--- ode/branches/APACHE_ODE_1.X/axis2-war/src/test/java/org/apache/ode/axis2/MessageStructureTest.java (original)
+++ ode/branches/APACHE_ODE_1.X/axis2-war/src/test/java/org/apache/ode/axis2/MessageStructureTest.java Tue Dec 16 15:23:57 2008
@@ -6,9 +6,8 @@
import org.w3c.dom.Element;
public class MessageStructureTest extends Axis2TestBase {
-
- @Test
- public void testAttrWithNsValue() throws Exception {
+ @Test(dataProvider="configs")
+ public void testAttrWithNsValue() throws Exception {
String bundleName = "TestAttributeNamespaces";
// deploy the required service
server.deployService(DummyService.class.getCanonicalName());
Modified: ode/branches/APACHE_ODE_1.X/axis2-war/src/test/java/org/apache/ode/axis2/ServiceFaultCatchTest.java
URL: http://svn.apache.org/viewvc/ode/branches/APACHE_ODE_1.X/axis2-war/src/test/java/org/apache/ode/axis2/ServiceFaultCatchTest.java?rev=727213&r1=727212&r2=727213&view=diff
==============================================================================
--- ode/branches/APACHE_ODE_1.X/axis2-war/src/test/java/org/apache/ode/axis2/ServiceFaultCatchTest.java (original)
+++ ode/branches/APACHE_ODE_1.X/axis2-war/src/test/java/org/apache/ode/axis2/ServiceFaultCatchTest.java Tue Dec 16 15:23:57 2008
@@ -10,8 +10,7 @@
* @author Matthieu Riou <mr...@apache.org>
*/
public class ServiceFaultCatchTest extends Axis2TestBase {
-
- @Test
+ @Test(dataProvider="configs")
public void testSimpleFaultCatch() throws Exception {
String bundleName = "TestStructuredFault";
// deploy the required service
Modified: ode/branches/APACHE_ODE_1.X/axis2-war/src/test/java/org/apache/ode/axis2/SoapHeaderTest.java
URL: http://svn.apache.org/viewvc/ode/branches/APACHE_ODE_1.X/axis2-war/src/test/java/org/apache/ode/axis2/SoapHeaderTest.java?rev=727213&r1=727212&r2=727213&view=diff
==============================================================================
--- ode/branches/APACHE_ODE_1.X/axis2-war/src/test/java/org/apache/ode/axis2/SoapHeaderTest.java (original)
+++ ode/branches/APACHE_ODE_1.X/axis2-war/src/test/java/org/apache/ode/axis2/SoapHeaderTest.java Tue Dec 16 15:23:57 2008
@@ -25,13 +25,13 @@
* @author Matthieu Riou <mr...@apache.org>
*/
public class SoapHeaderTest extends Axis2TestBase {
-
- @Test
+ @Test(dataProvider="configs")
public void testSimplePassing() throws Exception {
server.deployService("TestSoapHeader", "dummy-service.wsdl",
new QName("http://axis2.ode.apache.org", "DummyService"), "DummyServiceSOAP11port_http",
new MessageReceiver() {
- public void receive(MessageContext messageCtx) throws AxisFault {
+ @SuppressWarnings("deprecation")
+ public void receive(MessageContext messageCtx) throws AxisFault {
OMElement cidElmt = messageCtx.getEnvelope().getHeader().getFirstElement();
assertEquals("ConversationId", cidElmt.getLocalName());
assertEquals("ZZZXYZ", cidElmt.getText());
Modified: ode/branches/APACHE_ODE_1.X/axis2-war/src/test/java/org/apache/ode/axis2/XSDReferencesDeployTest.java
URL: http://svn.apache.org/viewvc/ode/branches/APACHE_ODE_1.X/axis2-war/src/test/java/org/apache/ode/axis2/XSDReferencesDeployTest.java?rev=727213&r1=727212&r2=727213&view=diff
==============================================================================
--- ode/branches/APACHE_ODE_1.X/axis2-war/src/test/java/org/apache/ode/axis2/XSDReferencesDeployTest.java (original)
+++ ode/branches/APACHE_ODE_1.X/axis2-war/src/test/java/org/apache/ode/axis2/XSDReferencesDeployTest.java Tue Dec 16 15:23:57 2008
@@ -6,8 +6,7 @@
* @author Matthieu Riou <mr...@apache.org>
*/
public class XSDReferencesDeployTest extends Axis2TestBase {
-
- @Test
+ @Test(dataProvider="configs")
public void testSimpleFaultCatch() throws Exception {
server.deployService(DummyService.class.getCanonicalName());
// If we have a bug, this will throw an exception, no need to assert
@@ -15,5 +14,4 @@
server.undeployProcess("XSDReferences");
}
-
}
Modified: ode/branches/APACHE_ODE_1.X/axis2-war/src/test/java/org/apache/ode/axis2/correlation/CorrelationJoinHibTest.java
URL: http://svn.apache.org/viewvc/ode/branches/APACHE_ODE_1.X/axis2-war/src/test/java/org/apache/ode/axis2/correlation/CorrelationJoinHibTest.java?rev=727213&r1=727212&r2=727213&view=diff
==============================================================================
--- ode/branches/APACHE_ODE_1.X/axis2-war/src/test/java/org/apache/ode/axis2/correlation/CorrelationJoinHibTest.java (original)
+++ ode/branches/APACHE_ODE_1.X/axis2-war/src/test/java/org/apache/ode/axis2/correlation/CorrelationJoinHibTest.java Tue Dec 16 15:23:57 2008
@@ -1,12 +1,8 @@
package org.apache.ode.axis2.correlation;
-import org.testng.annotations.BeforeMethod;
-
public class CorrelationJoinHibTest extends CorrelationJoinTest {
- @BeforeMethod
- protected void setUp() throws Exception {
- System.setProperty("org.apache.ode.configDir",
- getClass().getClassLoader().getResource("webapp").getFile() + "/WEB-INF/conf.hib-derby");
- super.setUp();
- }
+ @Override
+ public String getODEConfigDir() {
+ return getClass().getClassLoader().getResource("webapp").getFile() + "/WEB-INF/conf.hib-derby";
+ }
}
\ No newline at end of file
Modified: ode/branches/APACHE_ODE_1.X/axis2-war/src/test/java/org/apache/ode/axis2/correlation/CorrelationJoinLazyHibTest.java
URL: http://svn.apache.org/viewvc/ode/branches/APACHE_ODE_1.X/axis2-war/src/test/java/org/apache/ode/axis2/correlation/CorrelationJoinLazyHibTest.java?rev=727213&r1=727212&r2=727213&view=diff
==============================================================================
--- ode/branches/APACHE_ODE_1.X/axis2-war/src/test/java/org/apache/ode/axis2/correlation/CorrelationJoinLazyHibTest.java (original)
+++ ode/branches/APACHE_ODE_1.X/axis2-war/src/test/java/org/apache/ode/axis2/correlation/CorrelationJoinLazyHibTest.java Tue Dec 16 15:23:57 2008
@@ -1,12 +1,8 @@
package org.apache.ode.axis2.correlation;
-import org.testng.annotations.BeforeMethod;
-
public class CorrelationJoinLazyHibTest extends CorrelationJoinLazyTest {
- @BeforeMethod
- protected void setUp() throws Exception {
- System.setProperty("org.apache.ode.configDir",
- getClass().getClassLoader().getResource("webapp").getFile() + "/WEB-INF/conf.hib-derby");
- super.setUp();
- }
+ @Override
+ public String getODEConfigDir() {
+ return getClass().getClassLoader().getResource("webapp").getFile() + "/WEB-INF/conf.hib-derby";
+ }
}
\ No newline at end of file
Modified: ode/branches/APACHE_ODE_1.X/axis2-war/src/test/java/org/apache/ode/axis2/correlation/CorrelationJoinLazyTest.java
URL: http://svn.apache.org/viewvc/ode/branches/APACHE_ODE_1.X/axis2-war/src/test/java/org/apache/ode/axis2/correlation/CorrelationJoinLazyTest.java?rev=727213&r1=727212&r2=727213&view=diff
==============================================================================
--- ode/branches/APACHE_ODE_1.X/axis2-war/src/test/java/org/apache/ode/axis2/correlation/CorrelationJoinLazyTest.java (original)
+++ ode/branches/APACHE_ODE_1.X/axis2-war/src/test/java/org/apache/ode/axis2/correlation/CorrelationJoinLazyTest.java Tue Dec 16 15:23:57 2008
@@ -2,18 +2,19 @@
import org.apache.ode.axis2.Axis2TestBase;
import org.apache.ode.axis2.DummyService;
+import org.apache.ode.axis2.ODEConfigDirAware;
import org.testng.annotations.Test;
import static org.testng.Assert.*;
-public class CorrelationJoinLazyTest extends Axis2TestBase {
+public class CorrelationJoinLazyTest extends Axis2TestBase implements ODEConfigDirAware {
/**
* Tests a message being saved by no instance waiting for it. The saved message is picked up
* when the third message arrives, and is consumed.
*
* @throws Exception
*/
- @Test
+ @Test(dataProvider="configs")
public void testCorrelationJoin() throws Exception {
final String bundleName = "TestCorrelationJoinLazy";
@@ -57,4 +58,8 @@
server.undeployProcess(bundleName);
}
}
+
+ public String getODEConfigDir() {
+ return getClass().getClassLoader().getResource("webapp").getFile() + "/WEB-INF/conf.jpa-derby";
+ }
}
\ No newline at end of file
Modified: ode/branches/APACHE_ODE_1.X/axis2-war/src/test/java/org/apache/ode/axis2/correlation/CorrelationJoinTest.java
URL: http://svn.apache.org/viewvc/ode/branches/APACHE_ODE_1.X/axis2-war/src/test/java/org/apache/ode/axis2/correlation/CorrelationJoinTest.java?rev=727213&r1=727212&r2=727213&view=diff
==============================================================================
--- ode/branches/APACHE_ODE_1.X/axis2-war/src/test/java/org/apache/ode/axis2/correlation/CorrelationJoinTest.java (original)
+++ ode/branches/APACHE_ODE_1.X/axis2-war/src/test/java/org/apache/ode/axis2/correlation/CorrelationJoinTest.java Tue Dec 16 15:23:57 2008
@@ -2,17 +2,18 @@
import org.apache.ode.axis2.Axis2TestBase;
import org.apache.ode.axis2.DummyService;
+import org.apache.ode.axis2.ODEConfigDirAware;
import org.testng.annotations.Test;
import static org.testng.Assert.*;
-public class CorrelationJoinTest extends Axis2TestBase {
+public class CorrelationJoinTest extends Axis2TestBase implements ODEConfigDirAware {
/**
* Tests rendezvous
*
* @throws Exception
*/
- @Test
+ @Test(dataProvider="configs")
public void testCorrelationJoin() throws Exception {
final String bundleName = "TestCorrelationJoin";
@@ -56,4 +57,8 @@
server.undeployProcess(bundleName);
}
}
+
+ public String getODEConfigDir() {
+ return getClass().getClassLoader().getResource("webapp").getFile() + "/WEB-INF/conf.jpa-derby";
+ }
}
\ No newline at end of file
Modified: ode/branches/APACHE_ODE_1.X/axis2-war/src/test/java/org/apache/ode/axis2/correlation/CorrelationMultiHibTest.java
URL: http://svn.apache.org/viewvc/ode/branches/APACHE_ODE_1.X/axis2-war/src/test/java/org/apache/ode/axis2/correlation/CorrelationMultiHibTest.java?rev=727213&r1=727212&r2=727213&view=diff
==============================================================================
--- ode/branches/APACHE_ODE_1.X/axis2-war/src/test/java/org/apache/ode/axis2/correlation/CorrelationMultiHibTest.java (original)
+++ ode/branches/APACHE_ODE_1.X/axis2-war/src/test/java/org/apache/ode/axis2/correlation/CorrelationMultiHibTest.java Tue Dec 16 15:23:57 2008
@@ -1,12 +1,8 @@
package org.apache.ode.axis2.correlation;
-import org.testng.annotations.BeforeMethod;
-
public class CorrelationMultiHibTest extends CorrelationMultiTest {
- @BeforeMethod
- protected void setUp() throws Exception {
- System.setProperty("org.apache.ode.configDir",
- getClass().getClassLoader().getResource("webapp").getFile() + "/WEB-INF/conf.hib-derby");
- super.setUp();
- }
-}
+ @Override
+ public String getODEConfigDir() {
+ return getClass().getClassLoader().getResource("webapp").getFile() + "/WEB-INF/conf.hib-derby";
+ }
+}
\ No newline at end of file
Modified: ode/branches/APACHE_ODE_1.X/axis2-war/src/test/java/org/apache/ode/axis2/correlation/CorrelationMultiTest.java
URL: http://svn.apache.org/viewvc/ode/branches/APACHE_ODE_1.X/axis2-war/src/test/java/org/apache/ode/axis2/correlation/CorrelationMultiTest.java?rev=727213&r1=727212&r2=727213&view=diff
==============================================================================
--- ode/branches/APACHE_ODE_1.X/axis2-war/src/test/java/org/apache/ode/axis2/correlation/CorrelationMultiTest.java (original)
+++ ode/branches/APACHE_ODE_1.X/axis2-war/src/test/java/org/apache/ode/axis2/correlation/CorrelationMultiTest.java Tue Dec 16 15:23:57 2008
@@ -2,12 +2,13 @@
import org.apache.ode.axis2.Axis2TestBase;
import org.apache.ode.axis2.DummyService;
+import org.apache.ode.axis2.ODEConfigDirAware;
import org.testng.annotations.Test;
import static org.testng.Assert.*;
-public class CorrelationMultiTest extends Axis2TestBase {
- @Test
+public class CorrelationMultiTest extends Axis2TestBase implements ODEConfigDirAware {
+ @Test(dataProvider="configs")
public void testCorrelationMulti() throws Exception {
final String bundleName = "TestCorrelationMulti";
@@ -38,4 +39,8 @@
server.undeployProcess(bundleName);
}
}
+
+ public String getODEConfigDir() {
+ return getClass().getClassLoader().getResource("webapp").getFile() + "/WEB-INF/conf.jpa-derby";
+ }
}
\ No newline at end of file
Modified: ode/branches/APACHE_ODE_1.X/axis2-war/src/test/java/org/apache/ode/axis2/httpbinding/HttpBindingTest.java
URL: http://svn.apache.org/viewvc/ode/branches/APACHE_ODE_1.X/axis2-war/src/test/java/org/apache/ode/axis2/httpbinding/HttpBindingTest.java?rev=727213&r1=727212&r2=727213&view=diff
==============================================================================
--- ode/branches/APACHE_ODE_1.X/axis2-war/src/test/java/org/apache/ode/axis2/httpbinding/HttpBindingTest.java (original)
+++ ode/branches/APACHE_ODE_1.X/axis2-war/src/test/java/org/apache/ode/axis2/httpbinding/HttpBindingTest.java Tue Dec 16 15:23:57 2008
@@ -50,13 +50,13 @@
latch.await();
}
- @AfterMethod
+ @AfterMethod
protected void tearDown() throws Exception {
jettyWrapper.stop();
super.tearDown();
}
- @Test
+ @Test(dataProvider="configs")
public void testHttpBinding() throws Exception {
String bundleName = "TestHttpBinding";
// deploy the required service
@@ -74,26 +74,26 @@
}
}
- @Test
+ @Test(dataProvider="configs")
public void testHttpBindingExt_GET() throws Exception {
String bundleName = "TestHttpBindingExt_GET";
executeBundle(bundleName);
}
- @Test
+ @Test(dataProvider="configs")
public void testHttpBindingExt_DELETE() throws Exception {
String bundleName = "TestHttpBindingExt_DELETE";
executeBundle(bundleName);
}
- @Test
+ @Test(dataProvider="configs")
public void testHttpBindingExt_POST() throws Exception {
String bundleName = "TestHttpBindingExt_POST";
executeBundle(bundleName);
}
- @Test
+ @Test(dataProvider="configs")
public void testHttpBindingExt_PUT() throws Exception {
String bundleName = "TestHttpBindingExt_PUT";
executeBundle(bundleName);
Modified: ode/branches/APACHE_ODE_1.X/axis2-war/src/test/java/org/apache/ode/axis2/instancecleanup/CleanFailureTest.java
URL: http://svn.apache.org/viewvc/ode/branches/APACHE_ODE_1.X/axis2-war/src/test/java/org/apache/ode/axis2/instancecleanup/CleanFailureTest.java?rev=727213&r1=727212&r2=727213&view=diff
==============================================================================
--- ode/branches/APACHE_ODE_1.X/axis2-war/src/test/java/org/apache/ode/axis2/instancecleanup/CleanFailureTest.java (original)
+++ ode/branches/APACHE_ODE_1.X/axis2-war/src/test/java/org/apache/ode/axis2/instancecleanup/CleanFailureTest.java Tue Dec 16 15:23:57 2008
@@ -6,7 +6,7 @@
import org.testng.annotations.Test;
public class CleanFailureTest extends CleanTestBase {
- @Test
+ @Test(dataProvider="configs")
public void testCleanAll() throws Exception {
String bundleName = "TestCleanFailure";
// deploy the required service
@@ -23,7 +23,6 @@
}
}
- @Override
public String getODEConfigDir() {
return getClass().getClassLoader().getResource("webapp").getFile() + "/WEB-INF/conf.jpa-derby";
}
Modified: ode/branches/APACHE_ODE_1.X/axis2-war/src/test/java/org/apache/ode/axis2/instancecleanup/CleanFaultHibTest.java
URL: http://svn.apache.org/viewvc/ode/branches/APACHE_ODE_1.X/axis2-war/src/test/java/org/apache/ode/axis2/instancecleanup/CleanFaultHibTest.java?rev=727213&r1=727212&r2=727213&view=diff
==============================================================================
--- ode/branches/APACHE_ODE_1.X/axis2-war/src/test/java/org/apache/ode/axis2/instancecleanup/CleanFaultHibTest.java (original)
+++ ode/branches/APACHE_ODE_1.X/axis2-war/src/test/java/org/apache/ode/axis2/instancecleanup/CleanFaultHibTest.java Tue Dec 16 15:23:57 2008
@@ -5,7 +5,7 @@
public class CleanFaultHibTest extends CleanFaultTest {
@Override
- protected String getODEConfigDir() {
+ public String getODEConfigDir() {
return getClass().getClassLoader().getResource("webapp").getFile() + "/WEB-INF/conf.hib-derby";
}
Modified: ode/branches/APACHE_ODE_1.X/axis2-war/src/test/java/org/apache/ode/axis2/instancecleanup/CleanFaultTest.java
URL: http://svn.apache.org/viewvc/ode/branches/APACHE_ODE_1.X/axis2-war/src/test/java/org/apache/ode/axis2/instancecleanup/CleanFaultTest.java?rev=727213&r1=727212&r2=727213&view=diff
==============================================================================
--- ode/branches/APACHE_ODE_1.X/axis2-war/src/test/java/org/apache/ode/axis2/instancecleanup/CleanFaultTest.java (original)
+++ ode/branches/APACHE_ODE_1.X/axis2-war/src/test/java/org/apache/ode/axis2/instancecleanup/CleanFaultTest.java Tue Dec 16 15:23:57 2008
@@ -9,12 +9,12 @@
import org.testng.annotations.Test;
public class CleanFaultTest extends CleanTestBase {
- @Test
+ @Test(dataProvider="configs")
public void testCleanNone() throws Exception {
go("TestCleanFault_None", 1, 0, 0, 1, 2, 0, 4, 2, 3, 2, 38, 47);
}
- @Test
+ @Test(dataProvider="configs")
public void testCleanInstance() throws Exception {
try {
go("TestCleanSuccess_Instance", 0, 0, 0, 0, 3, 0, 6, 2, 3, 6, 59, 70);
@@ -22,32 +22,32 @@
} catch(ContextException re) {}
}
- @Test
+ @Test(dataProvider="configs")
public void testCleanVariables() throws Exception {
go("TestCleanFault_Variables", 1, 0, 0, 1, 2, 0, 4, 0, 0, 0, 38, 45);
}
- @Test
+ @Test(dataProvider="configs")
public void testCleanMessages() throws Exception {
go("TestCleanFault_Messages", 1, 0, 0, 1, 0, 0, 0, 2, 3, 2, 38, 41);
}
- @Test
+ @Test(dataProvider="configs")
public void testCleanCorrelations() throws Exception {
go("TestCleanFault_Correlations", 1, 0, 0, 1, 2, 0, 4, 2, 3, 2, 38, 47);
}
- @Test
+ @Test(dataProvider="configs")
public void testCleanEvents() throws Exception {
go("TestCleanFault_Events", 1, 0, 0, 1, 2, 0, 4, 2, 3, 2, 0, 9);
}
- @Test
+ @Test(dataProvider="configs")
public void testCleanMessageCorrEvents() throws Exception {
go("TestCleanFault_MessageCorrEvents", 1, 0, 0, 1, 0, 0, 0, 2, 3, 2, 0, 3);
}
- @Test
+ @Test(dataProvider="configs")
public void testCleanAll() throws Exception {
go("TestCleanFault_All", 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
}
@@ -70,8 +70,7 @@
}
}
- @Override
- protected String getODEConfigDir() {
+ public String getODEConfigDir() {
return getClass().getClassLoader().getResource("webapp").getFile() + "/WEB-INF/conf.jpa-derby";
}
Modified: ode/branches/APACHE_ODE_1.X/axis2-war/src/test/java/org/apache/ode/axis2/instancecleanup/CleanSuccessHibTest.java
URL: http://svn.apache.org/viewvc/ode/branches/APACHE_ODE_1.X/axis2-war/src/test/java/org/apache/ode/axis2/instancecleanup/CleanSuccessHibTest.java?rev=727213&r1=727212&r2=727213&view=diff
==============================================================================
--- ode/branches/APACHE_ODE_1.X/axis2-war/src/test/java/org/apache/ode/axis2/instancecleanup/CleanSuccessHibTest.java (original)
+++ ode/branches/APACHE_ODE_1.X/axis2-war/src/test/java/org/apache/ode/axis2/instancecleanup/CleanSuccessHibTest.java Tue Dec 16 15:23:57 2008
@@ -5,7 +5,7 @@
public class CleanSuccessHibTest extends CleanSuccessTest {
@Override
- protected String getODEConfigDir() {
+ public String getODEConfigDir() {
return getClass().getClassLoader().getResource("webapp").getFile() + "/WEB-INF/conf.hib-derby";
}
Modified: ode/branches/APACHE_ODE_1.X/axis2-war/src/test/java/org/apache/ode/axis2/instancecleanup/CleanSuccessTest.java
URL: http://svn.apache.org/viewvc/ode/branches/APACHE_ODE_1.X/axis2-war/src/test/java/org/apache/ode/axis2/instancecleanup/CleanSuccessTest.java?rev=727213&r1=727212&r2=727213&view=diff
==============================================================================
--- ode/branches/APACHE_ODE_1.X/axis2-war/src/test/java/org/apache/ode/axis2/instancecleanup/CleanSuccessTest.java (original)
+++ ode/branches/APACHE_ODE_1.X/axis2-war/src/test/java/org/apache/ode/axis2/instancecleanup/CleanSuccessTest.java Tue Dec 16 15:23:57 2008
@@ -8,12 +8,12 @@
import static org.testng.AssertJUnit.fail;
public class CleanSuccessTest extends CleanTestBase {
- @Test
+ @Test(dataProvider="configs")
public void testCleanNone() throws Exception {
go("TestCleanSuccess_None", 1, 0, 0, 0, 3, 0, 6, 2, 3, 6, 59, 76);
}
- @Test
+ @Test(dataProvider="configs")
public void testCleanInstance() throws Exception {
try {
go("TestCleanSuccess_Instance", 0, 0, 0, 0, 3, 0, 6, 2, 3, 6, 59, 70);
@@ -21,32 +21,32 @@
} catch(ContextException re) {}
}
- @Test
+ @Test(dataProvider="configs")
public void testCleanVariables() throws Exception {
go("TestCleanSuccess_Variables", 1, 0, 0, 0, 3, 0, 6, 0, 0, 0, 59, 70);
}
- @Test
+ @Test(dataProvider="configs")
public void testCleanMessages() throws Exception {
go("TestCleanSuccess_Messages", 1, 0, 0, 0, 0, 0, 0, 2, 3, 6, 59, 65);
}
- @Test
+ @Test(dataProvider="configs")
public void testCleanCorrelations() throws Exception {
go("TestCleanSuccess_Correlations", 1, 0, 0, 0, 3, 0, 6, 2, 3, 6, 59, 76);
}
- @Test
+ @Test(dataProvider="configs")
public void testCleanEvents() throws Exception {
go("TestCleanSuccess_Events", 1, 0, 0, 0, 3, 0, 6, 2, 3, 6, 0, 17);
}
- @Test
+ @Test(dataProvider="configs")
public void testCleanMessageCorrEvents() throws Exception {
go("TestCleanSuccess_MessageCorrEvents", 1, 0, 0, 0, 0, 0, 0, 2, 3, 6, 0, 6);
}
- @Test
+ @Test(dataProvider="configs")
public void testCleanAll() throws Exception {
go("TestCleanSuccess_All", 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
}
@@ -66,8 +66,7 @@
}
}
- @Override
- protected String getODEConfigDir() {
+ public String getODEConfigDir() {
return getClass().getClassLoader().getResource("webapp").getFile() + "/WEB-INF/conf.jpa-derby";
}
Modified: ode/branches/APACHE_ODE_1.X/axis2-war/src/test/java/org/apache/ode/axis2/instancecleanup/CleanTestBase.java
URL: http://svn.apache.org/viewvc/ode/branches/APACHE_ODE_1.X/axis2-war/src/test/java/org/apache/ode/axis2/instancecleanup/CleanTestBase.java?rev=727213&r1=727212&r2=727213&view=diff
==============================================================================
--- ode/branches/APACHE_ODE_1.X/axis2-war/src/test/java/org/apache/ode/axis2/instancecleanup/CleanTestBase.java (original)
+++ ode/branches/APACHE_ODE_1.X/axis2-war/src/test/java/org/apache/ode/axis2/instancecleanup/CleanTestBase.java Tue Dec 16 15:23:57 2008
@@ -6,6 +6,7 @@
import java.io.File;
import org.apache.ode.axis2.Axis2TestBase;
+import org.apache.ode.axis2.ODEConfigDirAware;
import org.apache.ode.axis2.ODEConfigProperties;
import org.apache.ode.bpel.dao.ProcessDAO;
import org.apache.ode.bpel.dao.ProcessInstanceDAO;
@@ -14,21 +15,14 @@
import org.apache.ode.il.EmbeddedGeronimoFactory;
import org.apache.ode.il.dbutil.Database;
import org.testng.annotations.AfterMethod;
-import org.testng.annotations.BeforeMethod;
import javax.transaction.TransactionManager;
-public abstract class CleanTestBase extends Axis2TestBase {
+public abstract class CleanTestBase extends Axis2TestBase implements ODEConfigDirAware {
protected ProfilingBpelDAOConnection daoConn;
protected TransactionManager txm;
protected int initialLargeDataCount = 0;
- @BeforeMethod
- protected void setUp() throws Exception {
- System.setProperty("org.apache.ode.configDir", getODEConfigDir());
- super.setUp();
- }
-
@AfterMethod
protected void tearDown() throws Exception {
stopTM();
@@ -75,8 +69,6 @@
return db;
}
- protected abstract String getODEConfigDir();
-
protected TransactionManager getTransactionManager() {
return txm;
}
Modified: ode/branches/APACHE_ODE_1.X/axis2-war/src/test/java/org/apache/ode/axis2/management/RetireTest.java
URL: http://svn.apache.org/viewvc/ode/branches/APACHE_ODE_1.X/axis2-war/src/test/java/org/apache/ode/axis2/management/RetireTest.java?rev=727213&r1=727212&r2=727213&view=diff
==============================================================================
--- ode/branches/APACHE_ODE_1.X/axis2-war/src/test/java/org/apache/ode/axis2/management/RetireTest.java (original)
+++ ode/branches/APACHE_ODE_1.X/axis2-war/src/test/java/org/apache/ode/axis2/management/RetireTest.java Tue Dec 16 15:23:57 2008
@@ -11,7 +11,7 @@
*/
public class RetireTest extends Axis2TestBase {
- @Test
+ @Test(dataProvider="configs")
public void testRetiredInstance() throws Exception {
String bundleName = "TestInstanceRetire";
System.out.println("=> " + server.getODEServer().getProcessStore().getPackages());
Modified: ode/branches/APACHE_ODE_1.X/axis2-war/src/test/java/org/apache/ode/dao/ProcessInstanceProfileDAO.java
URL: http://svn.apache.org/viewvc/ode/branches/APACHE_ODE_1.X/axis2-war/src/test/java/org/apache/ode/dao/ProcessInstanceProfileDAO.java?rev=727213&r1=727212&r2=727213&view=diff
==============================================================================
--- ode/branches/APACHE_ODE_1.X/axis2-war/src/test/java/org/apache/ode/dao/ProcessInstanceProfileDAO.java (original)
+++ ode/branches/APACHE_ODE_1.X/axis2-war/src/test/java/org/apache/ode/dao/ProcessInstanceProfileDAO.java Tue Dec 16 15:23:57 2008
@@ -1,46 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package org.apache.ode.bpel.dao;
-
-import java.util.List;
-
-public interface ProcessInstanceProfileDAO extends ProcessProfileDAO {
- ProcessDAO getProcess();
-
- List<ActivityRecoveryDAO> findActivityRecoveriesByInstance();
-
- List<CorrelationSetDAO> findCorrelationSetsByInstance();
-
- List<FaultDAO> findFaultsByInstance();
-
- List<MessageDAO> findMessagesByInstance();
-
- List<MessageExchangeDAO> findMessageExchangesByInstance();
-
- List<MessageRouteDAO> findMessageRoutesByInstance();
-
- List<PartnerLinkDAO> findPartnerLinksByInstance();
-
- List<ScopeDAO> findScopesByInstance();
-
- List<XmlDataDAO> findXmlDataByInstance();
-
- int countEventsByInstance();
-}
\ No newline at end of file
Modified: ode/branches/APACHE_ODE_1.X/axis2-war/src/test/java/org/apache/ode/dao/ProcessProfileDAO.java
URL: http://svn.apache.org/viewvc/ode/branches/APACHE_ODE_1.X/axis2-war/src/test/java/org/apache/ode/dao/ProcessProfileDAO.java?rev=727213&r1=727212&r2=727213&view=diff
==============================================================================
--- ode/branches/APACHE_ODE_1.X/axis2-war/src/test/java/org/apache/ode/dao/ProcessProfileDAO.java (original)
+++ ode/branches/APACHE_ODE_1.X/axis2-war/src/test/java/org/apache/ode/dao/ProcessProfileDAO.java Tue Dec 16 15:23:57 2008
@@ -1,50 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package org.apache.ode.bpel.dao;
-
-import java.util.List;
-
-public interface ProcessProfileDAO {
- boolean doesProcessExist();
-
- List<ProcessInstanceDAO> findInstancesByProcess();
-
- List<ActivityRecoveryDAO> findActivityRecoveriesByProcess();
-
- List<CorrelationSetDAO> findCorrelationSetsByProcess();
-
- List<CorrelatorDAO> findCorrelatorsByProcess();
-
- List<FaultDAO> findFaultsByProcess();
-
- List<MessageDAO> findMessagesByProcess();
-
- List<MessageExchangeDAO> findMessageExchangesByProcess();
-
- List<MessageRouteDAO> findMessageRoutesByProcess();
-
- List<PartnerLinkDAO> findPartnerLinksByProcess();
-
- List<ScopeDAO> findScopesByProcess();
-
- List<XmlDataDAO> findXmlDataByProcess();
-
- int countEventsByProcess();
-}
\ No newline at end of file