You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@zookeeper.apache.org by "Patrick Hunt (JIRA)" <ji...@apache.org> on 2008/08/06 21:08:44 UTC

[jira] Created: (ZOOKEEPER-111) significant cleanup of existing tests

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


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.


[jira] Commented: (ZOOKEEPER-111) significant cleanup of existing tests

Posted by "Flavio Paiva Junqueira (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/ZOOKEEPER-111?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12621839#action_12621839 ] 

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

Now both SyncCallTest and WatcherFuncTest are failing on ClientBase.recursiveDelete. Here are the reported messages:

{noformat}
junit.framework.AssertionFailedError: delete
	at org.apache.zookeeper.test.ClientBase.recursiveDelete(ClientBase.java:168)
	at org.apache.zookeeper.test.ClientBase.tearDown(ClientBase.java:158)
	at org.apache.zookeeper.test.WatcherFuncTest.tearDown(WatcherFuncTest.java:101)
{noformat}

> 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: TEST-org.apache.zookeeper.test.AsyncTest.txt, ZOOKEEPER-111.patch, 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.


[jira] Updated: (ZOOKEEPER-111) significant cleanup of existing tests

Posted by "Patrick Hunt (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/ZOOKEEPER-111?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Patrick Hunt updated ZOOKEEPER-111:
-----------------------------------

    Status: Patch Available  (was: Open)

Updated the patch to address point 1 - consistent hex output of session ids.

Added a separate jira ZOOKEEPER-116 for point 2 (do that one separate patch)


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


[jira] Commented: (ZOOKEEPER-111) significant cleanup of existing tests

Posted by "Mahadev konar (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/ZOOKEEPER-111?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12622932#action_12622932 ] 

Mahadev konar commented on ZOOKEEPER-111:
-----------------------------------------

This patch does not apply anymore. Can you upload a new one? Also, I htink we should commit this as it is and file new jira's for new problems on tests. 

> 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: TEST-org.apache.zookeeper.test.AsyncTest.txt, TEST-org.apache.zookeeper.test.QuorumTest.txt, ZOOKEEPER-111.patch, ZOOKEEPER-111.patch, ZOOKEEPER-111.patch, 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.


[jira] Updated: (ZOOKEEPER-111) significant cleanup of existing tests

Posted by "Patrick Hunt (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/ZOOKEEPER-111?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Patrick Hunt updated ZOOKEEPER-111:
-----------------------------------

    Attachment: ZOOKEEPER-111.patch

This patch is tested/passing on three machines:

1) my personal 1cpu 1.2ghz machine ubuntu
2) hudson zones machine (dual core x86 solaris)
3) 2cpu dualcore (4cores) 2ghz rhel

Note: I've comment out testReuse in SessionTest for the time being. The bug in ZOOKEEPER-63 is causing this test to fail (intermittently). I've updated that jira to note
this issue and as part of fixing that bug I will re-enable this test. Otw all tests are maintained from the mainline.

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


[jira] Updated: (ZOOKEEPER-111) significant cleanup of existing tests

Posted by "Patrick Hunt (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/ZOOKEEPER-111?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Patrick Hunt updated ZOOKEEPER-111:
-----------------------------------

    Attachment: ZOOKEEPER-111.patch

Recreated patch against latest svn.

> 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: TEST-org.apache.zookeeper.test.AsyncTest.txt, TEST-org.apache.zookeeper.test.QuorumTest.txt, ZOOKEEPER-111.patch, ZOOKEEPER-111.patch, ZOOKEEPER-111.patch, ZOOKEEPER-111.patch, 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.


[jira] Commented: (ZOOKEEPER-111) significant cleanup of existing tests

Posted by "Mahadev konar (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/ZOOKEEPER-111?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12620752#action_12620752 ] 

Mahadev konar commented on ZOOKEEPER-111:
-----------------------------------------

this is a really good thing to clean up our tests to be more reliable. the patch looks good. comments --- 

1) In clientcnxn.java the log message is 
LOG.warn("Closing session " + sessionId, e);
can we print the session id to be in hex to be consistent.

again in close() in clientcnxn.java can we print the sessionid in hex
 
also there are some in zookeeper.java.

2) It would be nice to pull out the quorum starting and stopping code from the quorum servers and create a utility class that allows creation of n number of quorum servers in the tests. This is not related to this jira but would be a good thing to clean up. This is just a nice to have and the patch is good without this as well.


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


[jira] Commented: (ZOOKEEPER-111) significant cleanup of existing tests

Posted by "Patrick Hunt (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/ZOOKEEPER-111?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12622722#action_12622722 ] 

Patrick Hunt commented on ZOOKEEPER-111:
----------------------------------------

Flavio, at least one of the tests that's failing (testHammer) seems related to a quorum problem, can you take a look?

2008-08-14 11:28:40,695 - ERROR [FollowerHandler-/127.0.0.1:2599:FollowerHandler@343] - FIXMSG
java.net.SocketTimeoutException: Read timed out
	at java.net.SocketInputStream.socketRead0(Native Method)
	at java.net.SocketInputStream.read(SocketInputStream.java:129)
	at java.io.BufferedInputStream.fill(BufferedInputStream.java:218)
	at java.io.BufferedInputStream.read(BufferedInputStream.java:237)
	at java.io.DataInputStream.readInt(DataInputStream.java:370)
	at org.apache.jute.BinaryInputArchive.readInt(BinaryInputArchive.java:64)
	at org.apache.zookeeper.server.quorum.QuorumPacket.deserialize(QuorumPacket.java:65)
	at org.apache.jute.BinaryInputArchive.readRecord(BinaryInputArchive.java:109)
	at org.apache.zookeeper.server.quorum.FollowerHandler.run(FollowerHandler.java:279)

After which the followers all seem to shutdown.

The test is failing because the clients are not complete (10 clients creating 1000 nodes) even after 5 minutes.

What type of hardware is this?


> 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: TEST-org.apache.zookeeper.test.AsyncTest.txt, TEST-org.apache.zookeeper.test.QuorumTest.txt, ZOOKEEPER-111.patch, ZOOKEEPER-111.patch, ZOOKEEPER-111.patch, 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.


[jira] Updated: (ZOOKEEPER-111) significant cleanup of existing tests

Posted by "Flavio Paiva Junqueira (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/ZOOKEEPER-111?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Flavio Paiva Junqueira updated ZOOKEEPER-111:
---------------------------------------------

    Attachment: TEST-org.apache.zookeeper.test.AsyncTest.txt

As requested, logs from the test run.

> 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: TEST-org.apache.zookeeper.test.AsyncTest.txt, 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.


[jira] Commented: (ZOOKEEPER-111) significant cleanup of existing tests

Posted by "Patrick Hunt (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/ZOOKEEPER-111?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12621139#action_12621139 ] 

Patrick Hunt commented on ZOOKEEPER-111:
----------------------------------------

Mahadev and I saw that there is still some timing issue in asynctest, shows up rarely for us. Does this happen every time or just occasionally?

Please attach the entire log, the issues pasted are related to the close race ZOOKEEPER-63.

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


[jira] Updated: (ZOOKEEPER-111) significant cleanup of existing tests

Posted by "Patrick Hunt (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/ZOOKEEPER-111?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Patrick Hunt updated ZOOKEEPER-111:
-----------------------------------

    Attachment: ZOOKEEPER-111.patch

same as last patch except I don't check for file delete success (see ZOOKEEPER-121) as it fails under windows (this is what flavio was seeing)

I'm still seeing some weirdness on windows (linux is fine) in QuorumTest, testHammer still sometimes fails for me on windows xp.

Flavio, please give this another try.


> 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: TEST-org.apache.zookeeper.test.AsyncTest.txt, ZOOKEEPER-111.patch, ZOOKEEPER-111.patch, 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.


[jira] Commented: (ZOOKEEPER-111) significant cleanup of existing tests

Posted by "Hudson (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/ZOOKEEPER-111?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12623633#action_12623633 ] 

Hudson commented on ZOOKEEPER-111:
----------------------------------

Integrated in ZooKeeper-trunk #58 (See [http://hudson.zones.apache.org/hudson/job/ZooKeeper-trunk/58/])

> 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
>             Fix For: 3.0.0
>
>         Attachments: TEST-org.apache.zookeeper.test.AsyncTest.txt, TEST-org.apache.zookeeper.test.QuorumTest.txt, ZOOKEEPER-111.patch, ZOOKEEPER-111.patch, ZOOKEEPER-111.patch, ZOOKEEPER-111.patch, 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.


[jira] Commented: (ZOOKEEPER-111) significant cleanup of existing tests

Posted by "Flavio Paiva Junqueira (JIRA)" <ji...@apache.org>.
    [ 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.


[jira] Updated: (ZOOKEEPER-111) significant cleanup of existing tests

Posted by "Mahadev konar (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/ZOOKEEPER-111?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Mahadev konar updated ZOOKEEPER-111:
------------------------------------

    Status: Open  (was: Patch Available)

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


[jira] Updated: (ZOOKEEPER-111) significant cleanup of existing tests

Posted by "Flavio Paiva Junqueira (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/ZOOKEEPER-111?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Flavio Paiva Junqueira updated ZOOKEEPER-111:
---------------------------------------------

    Attachment: TEST-org.apache.zookeeper.test.QuorumTest.txt

QuorumTest still fails in my Windows XP machine. It did run fine on a Ubuntu box. Now, something interesting that I just observed with this new patch is that the previous one was using gigabytes of data of my disk. I noticed because after I ran "ant test" with the previous patch, my OS started complaining about disk space. Once I deleted the eclipse project I regained several gigabytes of space, and after running "ant test" with this new patch, I noticed that the amount of disk space available had barely changed.

I'm attaching the test logs for QuorumTest. 

> 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: TEST-org.apache.zookeeper.test.AsyncTest.txt, TEST-org.apache.zookeeper.test.QuorumTest.txt, ZOOKEEPER-111.patch, ZOOKEEPER-111.patch, ZOOKEEPER-111.patch, 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.


[jira] Updated: (ZOOKEEPER-111) significant cleanup of existing tests

Posted by "Patrick Hunt (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/ZOOKEEPER-111?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Patrick Hunt updated ZOOKEEPER-111:
-----------------------------------

    Attachment: ZOOKEEPER-111.patch

This patch has everything from previous version plus:

1) hammerthreads are now named better (for debugging)
2) testHammer joins for 60sec rather than 10 (if very slow machine)
3) if the join fails we now print the stack of the thread that didn't shutdown

4) various cleanups from findbugs

> 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: TEST-org.apache.zookeeper.test.AsyncTest.txt, ZOOKEEPER-111.patch, 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.


[jira] Updated: (ZOOKEEPER-111) significant cleanup of existing tests

Posted by "Patrick Hunt (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/ZOOKEEPER-111?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Patrick Hunt updated ZOOKEEPER-111:
-----------------------------------

    Attachment: ZOOKEEPER-111.patch

Updated patch to output hex session ids for the logs I added.

Went through the code and fixed up any other sessionid logging that wasn't using hex.

In addition I added "0x" prefix to any hex values output to the log.


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


[jira] Updated: (ZOOKEEPER-111) significant cleanup of existing tests

Posted by "Mahadev konar (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/ZOOKEEPER-111?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Mahadev konar updated ZOOKEEPER-111:
------------------------------------

       Resolution: Fixed
    Fix Version/s: 3.0.0
     Hadoop Flags: [Reviewed]
           Status: Resolved  (was: Patch Available)

I just committed this. Thanks Pat.

> 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
>             Fix For: 3.0.0
>
>         Attachments: TEST-org.apache.zookeeper.test.AsyncTest.txt, TEST-org.apache.zookeeper.test.QuorumTest.txt, ZOOKEEPER-111.patch, ZOOKEEPER-111.patch, ZOOKEEPER-111.patch, ZOOKEEPER-111.patch, 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.


[jira] Updated: (ZOOKEEPER-111) significant cleanup of existing tests

Posted by "Patrick Hunt (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/ZOOKEEPER-111?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Patrick Hunt updated ZOOKEEPER-111:
-----------------------------------

    Attachment: ZOOKEEPER-111.patch

same as last patch except I addressed the issues on windows:

1) concurrency/fs sucks for single core, creating the 64mb log files (5) in quorum test was taking 15seconds / server - resulting in client timeout when session was not established quickly enough

2) testHammer in quorumtest is taking upwards of 8 minutes to complete on my 2ghz 1core windows machine

for 1) I decreased the log file prealloc in tests (tests only to 100k), and for 2) I reworked testHammer to monitor the running hammer threads and look for them to complete rather than assume they complete within some bounded time. (still a max though to handle runaways)

tested on ubuntu and windows and tests are passing.


> 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: TEST-org.apache.zookeeper.test.AsyncTest.txt, ZOOKEEPER-111.patch, ZOOKEEPER-111.patch, ZOOKEEPER-111.patch, 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.


[jira] Commented: (ZOOKEEPER-111) significant cleanup of existing tests

Posted by "Patrick Hunt (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/ZOOKEEPER-111?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12622720#action_12622720 ] 

Patrick Hunt commented on ZOOKEEPER-111:
----------------------------------------

Flavio: each zk server pre-allocates a 64m log file by default when started, the latest patch sets the pre-allocate size to 100K instead. This greatly reduces the amount of space needed to run the tests (in general each server started during the unit tests created a 64m log file)


> 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: TEST-org.apache.zookeeper.test.AsyncTest.txt, TEST-org.apache.zookeeper.test.QuorumTest.txt, ZOOKEEPER-111.patch, ZOOKEEPER-111.patch, ZOOKEEPER-111.patch, 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.


[jira] Updated: (ZOOKEEPER-111) significant cleanup of existing tests

Posted by "Patrick Hunt (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/ZOOKEEPER-111?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Patrick Hunt updated ZOOKEEPER-111:
-----------------------------------

    Status: Patch Available  (was: Open)

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