Some code cleanup.
diff --git a/modules/rampart-integration/src/test/java/org/apache/rampart/AbstractRampartTest.java b/modules/rampart-integration/src/test/java/org/apache/rampart/AbstractRampartTest.java
index 39f0d74..a009934 100644
--- a/modules/rampart-integration/src/test/java/org/apache/rampart/AbstractRampartTest.java
+++ b/modules/rampart-integration/src/test/java/org/apache/rampart/AbstractRampartTest.java
@@ -17,8 +17,6 @@
package org.apache.rampart;
import java.net.URL;
-import java.util.MissingResourceException;
-import java.util.ResourceBundle;
import org.apache.axiom.om.OMAbstractFactory;
import org.apache.axiom.om.OMElement;
@@ -32,7 +30,6 @@
import org.apache.axis2.transport.http.HTTPConstants;
import org.apache.neethi.Policy;
import org.apache.neethi.PolicyEngine;
-import org.junit.Rule;
/**
* Base test class for integration tests that require Axis2 web application running in a web container.
@@ -47,22 +44,6 @@
protected static final String RAMPART_CLIENT_REPO_PATH = "target/test-resources/rampart_client_repo";
- protected static final String RAMPART_SERVICE_REPO_PATH = "target/test-resources/rampart_service_repo";
-
- protected static ResourceBundle resources;
-
- @Rule
- public final JettyServer server = new JettyServer(
- RAMPART_SERVICE_REPO_PATH, isEnableHttp() ? 0 : -1, isEnableHttps() ? 0 : -1);
-
- static {
- try {
- resources = ResourceBundle.getBundle("org.apache.rampart.errors");
- } catch (MissingResourceException e) {
- throw new RuntimeException(e.getMessage());
- }
- }
-
protected ServiceClient getServiceClientInstance() throws AxisFault {
return getServiceClientInstance(null);
}
@@ -136,14 +117,4 @@
protected Policy loadPolicy(String xmlPath) {
return PolicyEngine.getPolicy(this.getClass().getResourceAsStream(xmlPath));
}
-
- /**
- * @return Implementations must return <code>true</code> to enable startup of web container's http connector or false otherwise.
- */
- protected abstract boolean isEnableHttp();
-
- /**
- * @return Implementations must return <code>true</code> to enable startup of web container's https connector or false otherwise.
- */
- protected abstract boolean isEnableHttps();
}
diff --git a/modules/rampart-integration/src/test/java/org/apache/rampart/RampartKerberosTest.java b/modules/rampart-integration/src/test/java/org/apache/rampart/RampartKerberosTest.java
index 2ee02a9..078fd1e 100644
--- a/modules/rampart-integration/src/test/java/org/apache/rampart/RampartKerberosTest.java
+++ b/modules/rampart-integration/src/test/java/org/apache/rampart/RampartKerberosTest.java
@@ -11,6 +11,7 @@
import org.apache.axiom.om.OMElement;
import org.apache.axis2.client.ServiceClient;
+import org.apache.axis2.integration.JettyServer;
import org.apache.commons.io.IOUtils;
import org.apache.neethi.Policy;
import org.apache.rampart.policy.model.KerberosConfig;
@@ -19,6 +20,7 @@
import org.custommonkey.xmlunit.XMLAssert;
import org.junit.After;
import org.junit.Before;
+import org.junit.Rule;
import org.junit.Test;
import org.xml.sax.SAXException;
@@ -62,6 +64,9 @@
*/
public static final String KERBEROS_CONF_KDC_PORT_TOKEN = "KDC_PORT";
+ @Rule
+ public final JettyServer server = new JettyServer("target/test-resources/rampart_service_repo", -1, 0);
+
/**
* Stores any original JAAS configuration set via {@link #JAAS_CONF_SYS_PROP} property to restore it after test execution.
*/
@@ -244,21 +249,4 @@
return krb5Conf;
}
-
- /* (non-Javadoc)
- * @see org.apache.rampart.AbstractRampartTest#isEnableHttp()
- */
- @Override
- protected boolean isEnableHttp() {
- //Kerberos test does not use http
- return false;
- }
-
- /* (non-Javadoc)
- * @see org.apache.rampart.AbstractRampartTest#isEnableHttps()
- */
- @Override
- protected boolean isEnableHttps() {
- return true;
- }
}