[ 
https://issues.apache.org/activemq/browse/CAMEL-2518?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=58077#action_58077
 ] 

Christian Schneider commented on CAMEL-2518:
--------------------------------------------

I got nearer to the core of the problem. By disabling the other tests in 
camel-jetty I found out the only one test really affects if the 
SpringHttpsRouteTest works.

When I only run HTTPRouteTest and then SpringHttpsRouteTest the build fails. If 
I leave out HTTPRouteTest and run all other tests the build works. So the 
problem is caused by HTTPRouteTest.  Then I checked which method caused the 
problem and found that any method containing DefaultHTTPClient will make the 
build fail.

Exactly the build failed when the method execute was called on 
DefaultHTTPClient. So I guess the problem is that something that 
DefaultHTTPClient does is not cleaned up after the test. 

I was even able to make my build work again by adding the following to the 
routebuilder in HTTPRouteTest:
                URL trustStoreUrl = 
Thread.currentThread().getContextClassLoader().getResource("jsse/localhost.ks");
                System.setProperty("javax.net.ssl.trustStore", 
trustStoreUrl.getPath());

This causes the DefaultHTTPClient to initialize with correct SSL settings. So 
when later the SpringHttpsRouteTest runs the settings are still in effect. 
Without these lines it seems the non ssl settings are initialized and not 
reinitialized in the later test.

So far my tests till now. The real core of the problem is not yet found but I 
think we are really near.


> Test failures in camel-jetty SpringHttpsRouteTest and 
> HttpRouteUsingUrlPostTest
> -------------------------------------------------------------------------------
>
>                 Key: CAMEL-2518
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-2518
>             Project: Apache Camel
>          Issue Type: Test
>          Components: camel-jetty
>    Affects Versions: 2.2.0
>         Environment: Windows Vista JDK 1.6 Upadte 14
>            Reporter: Christian Schneider
>             Fix For: 2.3.0
>
>         Attachments: surefire-report.html
>
>
> The test results are added as an attachment
> Running org.apache.camel.component.jetty.SpringHttpsRouteTest
> 2010-03-03 08:30:48.092:INFO::jetty-6.1.22
> 2010-03-03 08:30:48.100:INFO::Started sslsocketconnec...@localhost:9080
> 2010-03-03 08:30:48.183:WARN::EXCEPTION 
> javax.net.ssl.SSLHandshakeException: Received fatal alert: certificate_unknown
>       at com.sun.net.ssl.internal.ssl.Alerts.getSSLException(Alerts.java:174)
>       at com.sun.net.ssl.internal.ssl.Alerts.getSSLException(Alerts.java:136)
>       at 
> com.sun.net.ssl.internal.ssl.SSLSocketImpl.recvAlert(SSLSocketImpl.java:1682)
>       at 
> com.sun.net.ssl.internal.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:932)
>       at 
> com.sun.net.ssl.internal.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1112)
>       at 
> com.sun.net.ssl.internal.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1139)
>       at 
> com.sun.net.ssl.internal.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1123)
>       at 
> org.mortbay.jetty.security.SslSocketConnector$SslConnection.run(SslSocketConnector.java:675)
>       at 
> org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:582)
> 2010-03-03 08:30:49.404:INFO::jetty-6.1.22
> 2010-03-03 08:30:49.411:INFO::Started sslsocketconnec...@localhost:9080
> 2010-03-03 08:30:49.438:WARN::EXCEPTION 
> javax.net.ssl.SSLException: Unrecognized SSL message, plaintext connection?
>       at 
> com.sun.net.ssl.internal.ssl.InputRecord.handleUnknownRecord(InputRecord.java:523)
>       at com.sun.net.ssl.internal.ssl.InputRecord.read(InputRecord.java:355)
>       at 
> com.sun.net.ssl.internal.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:789)
>       at 
> com.sun.net.ssl.internal.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1112)
>       at 
> com.sun.net.ssl.internal.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1139)
>       at 
> com.sun.net.ssl.internal.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1123)
>       at 
> org.mortbay.jetty.security.SslSocketConnector$SslConnection.run(SslSocketConnector.java:675)
>       at 
> org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:582)
> Tests run: 2, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 3.556 sec <<< 
> FAILURE!
> Running org.apache.camel.component.jetty.HttpRouteUsingUrlPostTest
> 2010-03-03 08:31:27.291:INFO::jetty-6.1.22
> 2010-03-03 08:31:27.294:INFO::Started selectchannelconnec...@localhost:9080
> 2010-03-03 08:31:28.029:INFO::jetty-6.1.22
> 2010-03-03 08:31:28.032:INFO::Started selectchannelconnec...@localhost:9080
> 2010-03-03 08:31:28.637:INFO::jetty-6.1.22
> 2010-03-03 08:31:28.639:INFO::Started selectchannelconnec...@localhost:9080
> 2010-03-03 08:31:29.210:INFO::jetty-6.1.22
> 2010-03-03 08:31:29.213:INFO::Started selectchannelconnec...@localhost:9080
> 2010-03-03 08:31:29.773:INFO::jetty-6.1.22
> 2010-03-03 08:31:29.777:INFO::Started selectchannelconnec...@localhost:9080
> 2010-03-03 08:31:30.465:INFO::jetty-6.1.22
> 2010-03-03 08:31:30.467:INFO::Started selectchannelconnec...@localhost:9080
> 2010-03-03 08:31:31.154:INFO::jetty-6.1.22
> 2010-03-03 08:31:31.156:INFO::Started selectchannelconnec...@localhost:9080
> Tests run: 7, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 4.648 sec <<< 
> FAILURE!

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to