You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@zookeeper.apache.org by anmolnar <gi...@git.apache.org> on 2017/10/20 09:51:10 UTC

[GitHub] zookeeper pull request #402: ZOOKEEPER-2922: Flaky Test fix: org.apache.zook...

GitHub user anmolnar opened a pull request:

    https://github.com/apache/zookeeper/pull/402

    ZOOKEEPER-2922: Flaky Test fix: org.apache.zookeeper.test.LoadFromLogTest

    This patch is the backport of 
    https://issues.apache.org/jira/browse/ZOOKEEPER-2484
    in order to fix related flaky tests on branch-3.4.

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/anmolnar/zookeeper ZOOKEEPER-2922

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/zookeeper/pull/402.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #402
    
----
commit c78ae610b4283135c10d4541f08df0ef3cc72948
Author: Andor Molnár <an...@cloudera.com>
Date:   2017-10-20T09:42:03Z

    ZOOKEEPER-2922: Flaky Test fix: org.apache.zookeeper.test.LoadFromLogTest

----


---

[GitHub] zookeeper issue #402: ZOOKEEPER-2922: Flaky Test fix: org.apache.zookeeper.t...

Posted by anmolnar <gi...@git.apache.org>.
Github user anmolnar commented on the issue:

    https://github.com/apache/zookeeper/pull/402
  
    @afine Do you think it's better to cancel this change? Affected tests have been running fine for a couple of builds.


---

[GitHub] zookeeper issue #402: ZOOKEEPER-2922: Flaky Test fix: org.apache.zookeeper.t...

Posted by afine <gi...@git.apache.org>.
Github user afine commented on the issue:

    https://github.com/apache/zookeeper/pull/402
  
    @anmolnar You are correct that the command is executed with argument that would allow the tests to run in parallel but if you take a look at the build.xml on branch-3.4 it looks like the code to use "test.junit.threads" is not there. I believe the JIRA to add this was https://issues.apache.org/jira/browse/ZOOKEEPER-2183 which shows the change only touched 3.5 and master.


---

[GitHub] zookeeper pull request #402: ZOOKEEPER-2922: Flaky Test fix: org.apache.zook...

Posted by anmolnar <gi...@git.apache.org>.
Github user anmolnar closed the pull request at:

    https://github.com/apache/zookeeper/pull/402


---

[GitHub] zookeeper issue #402: ZOOKEEPER-2922: Flaky Test fix: org.apache.zookeeper.t...

Posted by anmolnar <gi...@git.apache.org>.
Github user anmolnar commented on the issue:

    https://github.com/apache/zookeeper/pull/402
  
    I got your point @afine, however I'm still under the impression that the root cause is that tests are running in parallel and multiple instances of Zookeeper are trying to run. I've seen "Address already in use exception" as an example of this.
    
    I also have a feeling that in some rare cases tests are trying to use the same instance in parallel and modifying each other's state.


---

[GitHub] zookeeper issue #402: ZOOKEEPER-2922: Flaky Test fix: org.apache.zookeeper.t...

Posted by afine <gi...@git.apache.org>.
Github user afine commented on the issue:

    https://github.com/apache/zookeeper/pull/402
  
    @anmolnar my understanding was that tests for branch-3.4 do not run in parallel. Let me know if I'm incorrect.


---

[GitHub] zookeeper issue #402: ZOOKEEPER-2922: Flaky Test fix: org.apache.zookeeper.t...

Posted by anmolnar <gi...@git.apache.org>.
Github user anmolnar commented on the issue:

    https://github.com/apache/zookeeper/pull/402
  
    @afine Here is the command I've extracted from build logs showing that junit runs tests on 8 threads:
    `[ZooKeeper_branch34_jdk8] $ ant -Dtest.output=yes -Dtest.junit.threads=8 -Dtest.junit.output.format=xml -Djavac.target=1.8 clean test-core-java`
    
    Please let me know if I need to check something else too.


---

[GitHub] zookeeper issue #402: ZOOKEEPER-2922: Flaky Test fix: org.apache.zookeeper.t...

Posted by afine <gi...@git.apache.org>.
Github user afine commented on the issue:

    https://github.com/apache/zookeeper/pull/402
  
    I think there is a better way to do this. Picking a new port for each test seems to be a workaround for failing to clean up the resources utilized by a failing test. It would be better if we cleaned up properly after a test execution. 
    
    Since this is the method we used to fix the test in another branch I think it is up to the discretion of the committers, but it would be nice to not leak any resources from our tests.


---

[GitHub] zookeeper issue #402: ZOOKEEPER-2922: Flaky Test fix: org.apache.zookeeper.t...

Posted by afine <gi...@git.apache.org>.
Github user afine commented on the issue:

    https://github.com/apache/zookeeper/pull/402
  
    @anmolnar It would be great to have a complete understanding of the root problem. Can you try changing the patch to cleanup after each test to see what happens?


---

[GitHub] zookeeper issue #402: ZOOKEEPER-2922: Flaky Test fix: org.apache.zookeeper.t...

Posted by anmolnar <gi...@git.apache.org>.
Github user anmolnar commented on the issue:

    https://github.com/apache/zookeeper/pull/402
  
    Obsoleted by https://github.com/apache/zookeeper/pull/409



---