You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by da...@apache.org on 2010/01/29 10:36:11 UTC
svn commit: r904434 -
/camel/trunk/components/camel-jetty/src/test/java/org/apache/camel/component/jetty/HttpsRouteTest.java
Author: davsclaus
Date: Fri Jan 29 09:36:09 2010
New Revision: 904434
URL: http://svn.apache.org/viewvc?rev=904434&view=rev
Log:
Skipping tests that dont run well on windows.
Modified:
camel/trunk/components/camel-jetty/src/test/java/org/apache/camel/component/jetty/HttpsRouteTest.java
Modified: camel/trunk/components/camel-jetty/src/test/java/org/apache/camel/component/jetty/HttpsRouteTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-jetty/src/test/java/org/apache/camel/component/jetty/HttpsRouteTest.java?rev=904434&r1=904433&r2=904434&view=diff
==============================================================================
--- camel/trunk/components/camel-jetty/src/test/java/org/apache/camel/component/jetty/HttpsRouteTest.java (original)
+++ camel/trunk/components/camel-jetty/src/test/java/org/apache/camel/component/jetty/HttpsRouteTest.java Fri Jan 29 09:36:09 2010
@@ -51,7 +51,7 @@
@Override
@Before
public void setUp() throws Exception {
- super.setUp();
+ super.setUp();
// ensure jsse clients can validate the self signed dummy localhost cert,
// use the server keystore as the trust store for these tests
URL trustStoreUrl = this.getClass().getClassLoader().getResource("jsse/localhost.ks");
@@ -83,6 +83,11 @@
@Test
public void testEndpoint() throws Exception {
+ // these tests does not run well on Windows
+ if (isPlatform("windows")) {
+ return;
+ }
+
MockEndpoint mockEndpointA = resolveMandatoryEndpoint("mock:a", MockEndpoint.class);
mockEndpointA.expectedBodiesReceived(expectedBody);
MockEndpoint mockEndpointB = resolveMandatoryEndpoint("mock:b", MockEndpoint.class);
@@ -108,7 +113,12 @@
@Test
public void testEndpointWithoutHttps() throws Exception {
- MockEndpoint mockEndpoint = resolveMandatoryEndpoint("mock:a", MockEndpoint.class);
+ // these tests does not run well on Windows
+ if (isPlatform("windows")) {
+ return;
+ }
+
+ MockEndpoint mockEndpoint = resolveMandatoryEndpoint("mock:a", MockEndpoint.class);
try {
template.sendBodyAndHeader("http://localhost:9080/test", expectedBody, "Content-Type", "application/xml");
fail("expect exception on access to https endpoint via http");
@@ -119,6 +129,10 @@
@Test
public void testHelloEndpoint() throws Exception {
+ // these tests does not run well on Windows
+ if (isPlatform("windows")) {
+ return;
+ }
ByteArrayOutputStream os = new ByteArrayOutputStream();
InputStream is = new URL("https://localhost:9080/hello").openStream();
@@ -129,18 +143,20 @@
String data = new String(os.toByteArray());
assertEquals("<b>Hello World</b>", data);
-
}
@Test
public void testHelloEndpointWithoutHttps() throws Exception {
+ // these tests does not run well on Windows
+ if (isPlatform("windows")) {
+ return;
+ }
+
try {
new URL("http://localhost:9080/hello").openStream();
fail("expected SocketException on use ot http");
} catch (SocketException expected) {
}
-
-
}
protected void invokeHttpEndpoint() throws IOException {