You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-commits@axis.apache.org by ve...@apache.org on 2018/01/07 21:19:49 UTC
svn commit: r1820501 -
/axis/axis2/java/core/scratch/java/veithen/AXIS2-5904/src/test/java/ServiceTest.java
Author: veithen
Date: Sun Jan 7 21:19:49 2018
New Revision: 1820501
URL: http://svn.apache.org/viewvc?rev=1820501&view=rev
Log:
AXIS2-5904: The problem is still reproducible with a single ConfigurationContext instance.
Modified:
axis/axis2/java/core/scratch/java/veithen/AXIS2-5904/src/test/java/ServiceTest.java
Modified: axis/axis2/java/core/scratch/java/veithen/AXIS2-5904/src/test/java/ServiceTest.java
URL: http://svn.apache.org/viewvc/axis/axis2/java/core/scratch/java/veithen/AXIS2-5904/src/test/java/ServiceTest.java?rev=1820501&r1=1820500&r2=1820501&view=diff
==============================================================================
--- axis/axis2/java/core/scratch/java/veithen/AXIS2-5904/src/test/java/ServiceTest.java (original)
+++ axis/axis2/java/core/scratch/java/veithen/AXIS2-5904/src/test/java/ServiceTest.java Sun Jan 7 21:19:49 2018
@@ -21,11 +21,11 @@ import java.util.Properties;
import org.apache.axis2.AxisFault;
import org.apache.axis2.client.ServiceClient;
-import org.apache.axis2.context.ConfigurationContext;
-import org.apache.axis2.context.ConfigurationContextFactory;
+import org.apache.axis2.testutils.ClientHelper;
import org.apache.neethi.Policy;
import org.apache.rampart.policy.model.CryptoConfig;
import org.apache.rampart.policy.model.RampartConfig;
+import org.junit.ClassRule;
import org.junit.Test;
import tn.nat.cnss.service.io.xsd.ArrayOfString;
@@ -35,15 +35,16 @@ import tn.nat.cnss.service.logic.DoTheJo
import tn.nat.cnss.service.logic.Sample2SignBodyServiceSSLStub;
public class ServiceTest {
+ @ClassRule
+ public static final ClientHelper clientHelper = new ClientHelper("target/client-repo");
+
@Test
public void test() throws Exception {
for (int i=0; i<100; i++) {
System.setProperty("javax.net.ssl.trustStore", "trust-store/server.jks");
System.setProperty("javax.net.ssl.trustStorePassword", "password");
- ConfigurationContext ctx = ConfigurationContextFactory.createConfigurationContextFromFileSystem("target/client-repo", null);
-
- Sample2SignBodyServiceSSLStub stub = new Sample2SignBodyServiceSSLStub(ctx,"https://localhost:8443/axis2/services/Sample2SignBodyServiceSSL");
+ Sample2SignBodyServiceSSLStub stub = clientHelper.createStub(Sample2SignBodyServiceSSLStub.class, "https://localhost:8443/axis2/services/Sample2SignBodyServiceSSL");
ServiceClient sc = stub._getServiceClient();