This is an automated email from the ASF dual-hosted git repository. dmvolod pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/camel.git
commit 8c37e12a2ffae6f4e3604b64b6d6fe17ff088ca5 Author: William Collins <[email protected]> AuthorDate: Wed Jun 6 13:27:22 2018 -0400 [CAMEL-11257] Added flexible port selection to testing --- .../test/java/org/apache/camel/component/as2/api/AS2MessageTest.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/components/camel-as2/camel-as2-api/src/test/java/org/apache/camel/component/as2/api/AS2MessageTest.java b/components/camel-as2/camel-as2-api/src/test/java/org/apache/camel/component/as2/api/AS2MessageTest.java index 61461d1..48f6a4b 100644 --- a/components/camel-as2/camel-as2-api/src/test/java/org/apache/camel/component/as2/api/AS2MessageTest.java +++ b/components/camel-as2/camel-as2-api/src/test/java/org/apache/camel/component/as2/api/AS2MessageTest.java @@ -43,6 +43,7 @@ import org.apache.camel.component.as2.api.util.EntityUtils; import org.apache.camel.component.as2.api.util.HttpMessageUtils; import org.apache.camel.component.as2.api.util.MicUtils; import org.apache.camel.component.as2.api.util.MicUtils.ReceivedContentMic; +import org.apache.camel.test.AvailablePortFinder; import org.apache.http.HttpEntity; import org.apache.http.HttpEntityEnclosingRequest; import org.apache.http.HttpException; @@ -114,9 +115,9 @@ public class AS2MessageTest { private static final Logger LOG = LoggerFactory.getLogger(AS2MessageTest.class); private static final String METHOD = "POST"; - private static final String RECIPIENT_DELIVERY_ADDRESS = "http://localhost:8080/handle-receipts"; private static final String TARGET_HOST = "localhost"; - private static final int TARGET_PORT = 8080; + private static final int TARGET_PORT = AvailablePortFinder.getNextAvailable(8080); + private static final String RECIPIENT_DELIVERY_ADDRESS = "http://localhost:" + TARGET_PORT + "/handle-receipts"; private static final String AS2_VERSION = "1.1"; private static final String USER_AGENT = "Camel AS2 Endpoint"; private static final String REQUEST_URI = "/"; -- To stop receiving notification emails like this one, please contact [email protected].
