On 17.12.2013 11:01, Rainer Jung wrote:

> A) TC 7
> =======
> 
> 1) org.apache.catalina.loader.TestWebappClassLoaderMemoryLeak
> -------------------------------------------------------------
> 
> 1 x apr, 3 x bio, 4 x nio

Fixed by syncing the test impl with trunk which uses a wait loop. No
more failures observed.

> 2) org.apache.catalina.websocket.TestWebSocket
> ----------------------------------------------
> 
> 2 x bio, 1 x nio

I think I know what the problem is and I'm just now running an ugly fix
in a loop. Looks good.

Problem: the web socket client in the test class reads from the socket
input stream first using a buffered reader (for the headers, encoding
ISO-8859-1) and then later using the raw input stream (for the body,
decoding using a B2CConverter to UTF-8). Sometimes the body can not be
found in the raw stream, because it already was slurped in by the
buffered reader.

Unfortunately simply using an InputStreamReader instead of a
BufferedReader doesn't fix the problem, because the InputStreamReader
still seems to buffer a few bytes sometimes.

So I'm now doing I/O only on the InputStream, converting to ISO-8859-1
resp. UTF-8 using B2CConverter. It seems to work, but is a bit more code
and also a bit ugly. I found no clean way of switching the decoding
charset with JDK APIs though.

So if I'm right those test failures were false positives.

Regards,

Rainer

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org

Reply via email to