You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hc.apache.org by "Oleg Kalnichevski (JIRA)" <ji...@apache.org> on 2007/06/16 19:36:26 UTC

[jira] Commented: (HTTPCORE-83) Test failures in SVN head

    [ https://issues.apache.org/jira/browse/HTTPCORE-83?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12505498 ] 

Oleg Kalnichevski commented on HTTPCORE-83:
-------------------------------------------

Hi Andres,

Can these failures be reliably reproduced? Do they happen just once in a while completely at random? If so, the socket timeout values may be a little too low for your system. I have been seeing similar problems on my computer when it was busy doing something else like compiling large projects in background.

Please apply the following patch and see if it makes any difference

Oleg

Index: /home/oleg/src/apache.org/jakarta/httpcomponents/httpcore/module-nio/src/test/java/org/apache/http/nio/protocol/TestNIOHttp.java
===================================================================
--- /home/oleg/src/apache.org/jakarta/httpcomponents/httpcore/module-nio/src/test/java/org/apache/http/nio/protocol/TestNIOHttp.java	(revision 546633)
+++ /home/oleg/src/apache.org/jakarta/httpcomponents/httpcore/module-nio/src/test/java/org/apache/http/nio/protocol/TestNIOHttp.java	(working copy)
@@ -179,7 +179,7 @@
     protected void setUp() throws Exception {
         HttpParams serverParams = new BasicHttpParams();
         serverParams
-            .setIntParameter(HttpConnectionParams.SO_TIMEOUT, 2000)
+            .setIntParameter(HttpConnectionParams.SO_TIMEOUT, 10000)
             .setIntParameter(HttpConnectionParams.SOCKET_BUFFER_SIZE, 8 * 1024)
             .setBooleanParameter(HttpConnectionParams.STALE_CONNECTION_CHECK, false)
             .setBooleanParameter(HttpConnectionParams.TCP_NODELAY, true)
@@ -189,8 +189,8 @@
         
         HttpParams clientParams = new BasicHttpParams();
         clientParams
-            .setIntParameter(HttpConnectionParams.SO_TIMEOUT, 2000)
-            .setIntParameter(HttpConnectionParams.CONNECTION_TIMEOUT, 2000)
+            .setIntParameter(HttpConnectionParams.SO_TIMEOUT, 10000)
+            .setIntParameter(HttpConnectionParams.CONNECTION_TIMEOUT, 10000)
             .setIntParameter(HttpConnectionParams.SOCKET_BUFFER_SIZE, 8 * 1024)
             .setBooleanParameter(HttpConnectionParams.STALE_CONNECTION_CHECK, false)
             .setBooleanParameter(HttpConnectionParams.TCP_NODELAY, true) 

> Test failures in SVN head
> -------------------------
>
>                 Key: HTTPCORE-83
>                 URL: https://issues.apache.org/jira/browse/HTTPCORE-83
>             Project: HttpComponents Core
>          Issue Type: Bug
>          Components: HttpCore NIO
>    Affects Versions: 4.0-alpha5
>         Environment: Dual core windows vista
>            Reporter: Anders Wallgren
>             Fix For: 4.0-alpha5
>
>
> In the current svn head (revision 547953), I'm getting these test failures:
> -------------------------------------------------------
>  T E S T S
> -------------------------------------------------------
> Running org.apache.http.nio.TestAll
> Exception in thread "worker-thread-28" java.lang.IllegalStateException: Buffer already closed for writing
>         at org.apache.http.nio.util.SharedOutputBuffer.write(SharedOutputBuffer.java:112)
>         at org.apache.http.nio.entity.ContentOutputStream.write(ContentOutputStream.java:67)
>         at org.apache.http.entity.ByteArrayEntity.writeTo(ByteArrayEntity.java:76)
>         at org.apache.http.nio.protocol.ThrottlingHttpServiceHandler.handleRequest(ThrottlingHttpServiceHandler.java:578)
>         at org.apache.http.nio.protocol.ThrottlingHttpServiceHandler.access$000(ThrottlingHttpServiceHandler.java:94)
>         at org.apache.http.nio.protocol.ThrottlingHttpServiceHandler$1.run(ThrottlingHttpServiceHandler.java:274)
>         at org.apache.http.nio.mockup.SimpleThreadPoolExecutor$WorkerThread.run(SimpleThreadPoolExecutor.java:204)
> Exception in thread "worker-thread-34" java.lang.IllegalStateException: Buffer already closed for writing
>         at org.apache.http.nio.util.SharedOutputBuffer.write(SharedOutputBuffer.java:112)
>         at org.apache.http.nio.entity.ContentOutputStream.write(ContentOutputStream.java:67)
>         at org.apache.http.entity.ByteArrayEntity.writeTo(ByteArrayEntity.java:76)
>         at org.apache.http.nio.protocol.ThrottlingHttpServiceHandler.handleRequest(ThrottlingHttpServiceHandler.java:578)
>         at org.apache.http.nio.protocol.ThrottlingHttpServiceHandler.access$000(ThrottlingHttpServiceHandler.java:94)
>         at org.apache.http.nio.protocol.ThrottlingHttpServiceHandler$1.run(ThrottlingHttpServiceHandler.java:274)
>         at org.apache.http.nio.mockup.SimpleThreadPoolExecutor$WorkerThread.run(SimpleThreadPoolExecutor.java:204)
> Exception in thread "worker-thread-39" java.lang.IllegalStateException: Buffer already closed for writing
>         at org.apache.http.nio.util.SharedOutputBuffer.write(SharedOutputBuffer.java:112)
>         at org.apache.http.nio.entity.ContentOutputStream.write(ContentOutputStream.java:67)
>         at org.apache.http.entity.ByteArrayEntity.writeTo(ByteArrayEntity.java:76)
>         at org.apache.http.nio.protocol.ThrottlingHttpServiceHandler.handleRequest(ThrottlingHttpServiceHandler.java:578)
>         at org.apache.http.nio.protocol.ThrottlingHttpServiceHandler.access$000(ThrottlingHttpServiceHandler.java:94)
>         at org.apache.http.nio.protocol.ThrottlingHttpServiceHandler$1.run(ThrottlingHttpServiceHandler.java:274)
>         at org.apache.http.nio.mockup.SimpleThreadPoolExecutor$WorkerThread.run(SimpleThreadPoolExecutor.java:204)
> Tests run: 100, Failures: 4, Errors: 0, Skipped: 0, Time elapsed: 11.224 sec <<< FAILURE!
> Results :
> Failed tests:
>   testSimpleHttpGets(org.apache.http.nio.protocol.TestNIOHttp)
>   testSimpleHttpPostsWithContentLength(org.apache.http.nio.protocol.TestNIOHttp)
>   testSimpleHttpPostsHTTP10(org.apache.http.nio.protocol.TestNIOHttp)
>   testSimpleHttpHeads(org.apache.http.nio.protocol.TestNIOHttp)
> Tests run: 100, Failures: 4, Errors: 0, Skipped: 0

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


---------------------------------------------------------------------
To unsubscribe, e-mail: httpcomponents-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: httpcomponents-dev-help@jakarta.apache.org