[ 
https://issues.apache.org/jira/browse/ZOOKEEPER-111?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12621128#action_12621128
 ] 

Flavio Paiva Junqueira commented on ZOOKEEPER-111:
--------------------------------------------------

AsyncTest is crashing consistently on my machine (Windows XP, jdk 1.6.0_02). 
Here is the output:

{noformat}
[junit] Tests run: 2, Failures: 2, Errors: 0, Time elapsed: 65.939 sec
    [junit] java.net.SocketException: Software caused connection abort: socket 
write error
    [junit]     at java.net.SocketOutputStream.socketWrite0(Native Method)
    [junit]     at 
java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:92)
    [junit]     at 
java.net.SocketOutputStream.write(SocketOutputStream.java:136)
    [junit]     at 
java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:65)
    [junit]     at 
java.io.BufferedOutputStream.flush(BufferedOutputStream.java:123)
    [junit]     at 
org.apache.zookeeper.server.quorum.Follower.writePacket(Follower.java:87)
    [junit]     at 
org.apache.zookeeper.server.quorum.Follower.followLeader(Follower.java:214)
    [junit]     at 
org.apache.zookeeper.server.quorum.QuorumPeer.run(QuorumPeer.java:401)
    [junit] java.io.EOFException
    [junit]     at java.io.DataInputStream.readInt(DataInputStream.java:375)
    [junit]     at 
org.apache.jute.BinaryInputArchive.readInt(BinaryInputArchive.java:64)
    [junit]     at 
org.apache.zookeeper.server.quorum.QuorumPacket.deserialize(QuorumPacket.java:65)
    [junit]     at 
org.apache.jute.BinaryInputArchive.readRecord(BinaryInputArchive.java:109)
    [junit]     at 
org.apache.zookeeper.server.quorum.Follower.readPacket(Follower.java:100)
    [junit]     at 
org.apache.zookeeper.server.quorum.Follower.followLeader(Follower.java:201)
    [junit]     at 
org.apache.zookeeper.server.quorum.QuorumPeer.run(QuorumPeer.java:401)
    [junit] java.io.EOFException
    [junit]     at java.io.DataInputStream.readInt(DataInputStream.java:375)
    [junit]     at 
org.apache.jute.BinaryInputArchive.readInt(BinaryInputArchive.java:64)
    [junit]     at 
org.apache.zookeeper.server.quorum.QuorumPacket.deserialize(QuorumPacket.java:65)
    [junit]     at 
org.apache.jute.BinaryInputArchive.readRecord(BinaryInputArchive.java:109)
    [junit]     at 
org.apache.zookeeper.server.quorum.Follower.readPacket(Follower.java:100)
    [junit]     at 
org.apache.zookeeper.server.quorum.Follower.followLeader(Follower.java:201)
    [junit]     at 
org.apache.zookeeper.server.quorum.QuorumPeer.run(QuorumPeer.java:401)
    [junit] java.io.EOFException
    [junit]     at java.io.DataInputStream.readInt(DataInputStream.java:375)
    [junit]     at 
org.apache.jute.BinaryInputArchive.readInt(BinaryInputArchive.java:64)
    [junit]     at 
org.apache.zookeeper.server.quorum.QuorumPacket.deserialize(QuorumPacket.java:65)
    [junit]     at 
org.apache.jute.BinaryInputArchive.readRecord(BinaryInputArchive.java:109)
    [junit]     at 
org.apache.zookeeper.server.quorum.Follower.readPacket(Follower.java:100)
    [junit]     at 
org.apache.zookeeper.server.quorum.Follower.followLeader(Follower.java:201)
    [junit]     at 
org.apache.zookeeper.server.quorum.QuorumPeer.run(QuorumPeer.java:401)
    [junit] java.net.SocketException: Software caused connection abort: socket 
write error
    [junit]     at java.net.SocketOutputStream.socketWrite0(Native Method)
    [junit]     at 
java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:92)
    [junit]     at 
java.net.SocketOutputStream.write(SocketOutputStream.java:136)
    [junit]     at 
java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:65)
    [junit]     at 
java.io.BufferedOutputStream.flush(BufferedOutputStream.java:123)
    [junit]     at 
org.apache.zookeeper.server.quorum.Follower.writePacket(Follower.java:87)
    [junit]     at 
org.apache.zookeeper.server.quorum.Follower.followLeader(Follower.java:214)
    [junit]     at 
org.apache.zookeeper.server.quorum.QuorumPeer.run(QuorumPeer.java:401)
    [junit] Test org.apache.zookeeper.test.AsyncTest FAILED 

{noformat}

Any idea?

> significant cleanup of existing tests
> -------------------------------------
>
>                 Key: ZOOKEEPER-111
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-111
>             Project: Zookeeper
>          Issue Type: Improvement
>          Components: tests
>            Reporter: Patrick Hunt
>            Assignee: Patrick Hunt
>         Attachments: ZOOKEEPER-111.patch, ZOOKEEPER-111.patch
>
>
> About to submit a patch that significantly cleans up existing tests.
> 1) removed the need for "sleep" calls in the tests, instead I monitor the 
> status of the server (using the client socket "stat" command) which provides 
> a barrier to the client test operations. I use this barrier both when 
> starting and ending the test.
> 2) also fixed a number of problems in the tests where the test itself was 
> broken.
> 3) general cleanup and some refactoring to make it easier to write new tests, 
> maintain old, and track down issues if the test does find a problem.

-- 
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