Author: veithen
Date: Sun Oct 16 19:44:43 2016
New Revision: 1765184
URL: http://svn.apache.org/viewvc?rev=1765184&view=rev
Log:
Merge r1739595 to the 1.7 branch.
Added:
axis/axis2/java/core/branches/1_7/modules/testutils/src/main/java/org/apache/axis2/testutils/Axis2Server.java
- copied unchanged from r1739595,
axis/axis2/java/core/trunk/modules/testutils/src/main/java/org/apache/axis2/testutils/Axis2Server.java
Modified:
axis/axis2/java/core/branches/1_7/ (props changed)
axis/axis2/java/core/branches/1_7/modules/adb-tests/pom.xml
axis/axis2/java/core/branches/1_7/modules/adb-tests/src/test/java/org/apache/axis2/databinding/axis2_5741/ServiceTest.java
axis/axis2/java/core/branches/1_7/modules/adb-tests/src/test/java/org/apache/axis2/databinding/axis2_5749/ServiceTest.java
Propchange: axis/axis2/java/core/branches/1_7/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Sun Oct 16 19:44:43 2016
@@ -1,4 +1,4 @@
/axis/axis2/java/core/branches/1_6:1295540
/axis/axis2/java/core/branches/AXIOM-420:1334386-1336397
/axis/axis2/java/core/branches/AXIS2-4318:1230452,1295542,1324772,1327468,1329571,1332141,1335355,1335357,1340985
-/axis/axis2/java/core/trunk:1726494,1726509,1726513,1727171,1727174,1727177,1727180,1729891,1730095,1730139,1730180,1730186,1730195,1730197,1730222,1730300,1730308,1730310,1730317,1730322,1730335,1730369,1730427,1730618,1731425,1731441,1731446,1731448,1732354,1733137,1733663,1733713,1733766,1733770,1733773,1733850,1734176,1735331,1735795,1736512,1736543,1737030,1737567,1739001,1739186,1739343,1739346,1739348,1739493,1739592,1739594,1739815,1739826,1740693-1740694,1743824,1745826,1745860,1745869,1745875,1745912,1745924,1745929,1745941,1746001,1746028,1746109,1746782,1746784,1746787,1746813,1746842,1746880,1746883,1746889,1746894,1747448,1747466,1747503,1747575,1747578,1747601,1747773,1747920,1751057,1752039,1765132
+/axis/axis2/java/core/trunk:1726494,1726509,1726513,1727171,1727174,1727177,1727180,1729891,1730095,1730139,1730180,1730186,1730195,1730197,1730222,1730300,1730308,1730310,1730317,1730322,1730335,1730369,1730427,1730618,1731425,1731441,1731446,1731448,1732354,1733137,1733663,1733713,1733766,1733770,1733773,1733850,1734176,1735331,1735795,1736512,1736543,1737030,1737567,1739001,1739186,1739343,1739346,1739348,1739493,1739592,1739594-1739595,1739815,1739826,1740693-1740694,1743824,1745826,1745860,1745869,1745875,1745912,1745924,1745929,1745941,1746001,1746028,1746109,1746782,1746784,1746787,1746813,1746842,1746880,1746883,1746889,1746894,1747448,1747466,1747503,1747575,1747578,1747601,1747773,1747920,1751057,1752039,1765132
Modified: axis/axis2/java/core/branches/1_7/modules/adb-tests/pom.xml
URL:
http://svn.apache.org/viewvc/axis/axis2/java/core/branches/1_7/modules/adb-tests/pom.xml?rev=1765184&r1=1765183&r2=1765184&view=diff
==============================================================================
--- axis/axis2/java/core/branches/1_7/modules/adb-tests/pom.xml (original)
+++ axis/axis2/java/core/branches/1_7/modules/adb-tests/pom.xml Sun Oct 16
19:44:43 2016
@@ -65,6 +65,12 @@
<scope>test</scope>
</dependency>
<dependency>
+ <groupId>${project.groupId}</groupId>
+ <artifactId>axis2-testutils</artifactId>
+ <version>${project.version}</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
<groupId>com.sun.xml.ws</groupId>
<artifactId>jaxws-rt</artifactId>
</dependency>
Modified:
axis/axis2/java/core/branches/1_7/modules/adb-tests/src/test/java/org/apache/axis2/databinding/axis2_5741/ServiceTest.java
URL:
http://svn.apache.org/viewvc/axis/axis2/java/core/branches/1_7/modules/adb-tests/src/test/java/org/apache/axis2/databinding/axis2_5741/ServiceTest.java?rev=1765184&r1=1765183&r2=1765184&view=diff
==============================================================================
---
axis/axis2/java/core/branches/1_7/modules/adb-tests/src/test/java/org/apache/axis2/databinding/axis2_5741/ServiceTest.java
(original)
+++
axis/axis2/java/core/branches/1_7/modules/adb-tests/src/test/java/org/apache/axis2/databinding/axis2_5741/ServiceTest.java
Sun Oct 16 19:44:43 2016
@@ -22,30 +22,22 @@ import static com.google.common.truth.Tr
import javax.xml.ws.BindingProvider;
-import org.apache.axiom.testutils.PortAllocator;
-import org.apache.axis2.context.ConfigurationContext;
-import org.apache.axis2.context.ConfigurationContextFactory;
import org.apache.axis2.databinding.axis2_5741.client.FiverxLinkService;
import
org.apache.axis2.databinding.axis2_5741.client.FiverxLinkService_Service;
-import org.apache.axis2.transport.http.SimpleHTTPServer;
+import org.apache.axis2.testutils.Axis2Server;
+import org.junit.ClassRule;
import org.junit.Test;
public class ServiceTest {
+ @ClassRule
+ public static Axis2Server server = new
Axis2Server("target/repo/AXIS2-5741");
+
@Test
public void test() throws Exception {
- int port = PortAllocator.allocatePort();
- ConfigurationContext configurationContext =
-
ConfigurationContextFactory.createConfigurationContextFromFileSystem("target/repo/AXIS2-5741");
- SimpleHTTPServer server = new SimpleHTTPServer(configurationContext,
port);
- server.start();
- try {
- FiverxLinkService client = new
FiverxLinkService_Service().getFiverxLinkServicePort();
- ((BindingProvider)client).getRequestContext().put(
- BindingProvider.ENDPOINT_ADDRESS_PROPERTY,
- "http://localhost:" + port +
"/axis2/services/FiverxLinkService");
- assertThat(client.ladeRzVersion("test")).isEqualTo("test result");
- } finally {
- server.stop();
- }
+ FiverxLinkService client = new
FiverxLinkService_Service().getFiverxLinkServicePort();
+ ((BindingProvider)client).getRequestContext().put(
+ BindingProvider.ENDPOINT_ADDRESS_PROPERTY,
+ "http://localhost:" + server.getPort() +
"/axis2/services/FiverxLinkService");
+ assertThat(client.ladeRzVersion("test")).isEqualTo("test result");
}
}
Modified:
axis/axis2/java/core/branches/1_7/modules/adb-tests/src/test/java/org/apache/axis2/databinding/axis2_5749/ServiceTest.java
URL:
http://svn.apache.org/viewvc/axis/axis2/java/core/branches/1_7/modules/adb-tests/src/test/java/org/apache/axis2/databinding/axis2_5749/ServiceTest.java?rev=1765184&r1=1765183&r2=1765184&view=diff
==============================================================================
---
axis/axis2/java/core/branches/1_7/modules/adb-tests/src/test/java/org/apache/axis2/databinding/axis2_5749/ServiceTest.java
(original)
+++
axis/axis2/java/core/branches/1_7/modules/adb-tests/src/test/java/org/apache/axis2/databinding/axis2_5749/ServiceTest.java
Sun Oct 16 19:44:43 2016
@@ -22,33 +22,25 @@ import static com.google.common.truth.Tr
import javax.xml.ws.BindingProvider;
-import org.apache.axiom.testutils.PortAllocator;
-import org.apache.axis2.context.ConfigurationContext;
-import org.apache.axis2.context.ConfigurationContextFactory;
import org.apache.axis2.databinding.axis2_5749.client.Color;
import org.apache.axis2.databinding.axis2_5749.client.ColorService;
import org.apache.axis2.databinding.axis2_5749.client.ColorService_Service;
-import org.apache.axis2.transport.http.SimpleHTTPServer;
+import org.apache.axis2.testutils.Axis2Server;
+import org.junit.ClassRule;
import org.junit.Test;
public class ServiceTest {
+ @ClassRule
+ public static Axis2Server server = new
Axis2Server("target/repo/AXIS2-5749");
+
@Test
public void test() throws Exception {
- int port = PortAllocator.allocatePort();
- ConfigurationContext configurationContext =
-
ConfigurationContextFactory.createConfigurationContextFromFileSystem("target/repo/AXIS2-5749");
- SimpleHTTPServer server = new SimpleHTTPServer(configurationContext,
port);
- server.start();
- try {
- ColorService client = new
ColorService_Service().getColorServiceSOAP();
- ((BindingProvider)client).getRequestContext().put(
- BindingProvider.ENDPOINT_ADDRESS_PROPERTY,
- "http://localhost:" + port +
"/axis2/services/ColorService");
- Color color = new Color();
- color.setIn("RED");
- assertThat(client.test(color).getOut()).isEqualTo("Red is good!");
- } finally {
- server.stop();
- }
+ ColorService client = new ColorService_Service().getColorServiceSOAP();
+ ((BindingProvider)client).getRequestContext().put(
+ BindingProvider.ENDPOINT_ADDRESS_PROPERTY,
+ "http://localhost:" + server.getPort() +
"/axis2/services/ColorService");
+ Color color = new Color();
+ color.setIn("RED");
+ assertThat(client.test(color).getOut()).isEqualTo("Red is good!");
}
}