You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tephra.apache.org by anwar6953 <gi...@git.apache.org> on 2016/09/09 07:08:53 UTC

[GitHub] incubator-tephra pull request #8: Fix flaky test (PooledClientProviderTest)

GitHub user anwar6953 opened a pull request:

    https://github.com/apache/incubator-tephra/pull/8

    Fix flaky test (PooledClientProviderTest)

    Fix flaky test (PooledClientProviderTest). Previously, the entire client pool was not exhausted.

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

    $ git pull https://github.com/anwar6953/incubator-tephra fix-flaky-test

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

    https://github.com/apache/incubator-tephra/pull/8.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 #8
    
----
commit 5b51404d301779759f7fba208c30ed7e8f6ba1ed
Author: Ali Anwar <an...@berkeley.edu>
Date:   2016-09-09T06:34:44Z

    Fix flaky test (PooledClientProviderTest). Previously, the entire client pool was not exhausted.

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-tephra pull request #8: Fix flaky test (PooledClientProviderTest)

Posted by poornachandra <gi...@git.apache.org>.
Github user poornachandra commented on a diff in the pull request:

    https://github.com/apache/incubator-tephra/pull/8#discussion_r78137526
  
    --- Diff: tephra-core/src/test/java/org/apache/tephra/distributed/PooledClientProviderTest.java ---
    @@ -154,11 +154,10 @@ public Boolean call() throws Exception {
         // now, try it again with, where each thread holds onto the client for twice the client.obtain.timeout value.
    --- End diff --
    
    Comments are outdated now


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-tephra pull request #8: Fix flaky test (PooledClientProviderTest)

Posted by poornachandra <gi...@git.apache.org>.
Github user poornachandra commented on a diff in the pull request:

    https://github.com/apache/incubator-tephra/pull/8#discussion_r78137456
  
    --- Diff: tephra-core/src/test/java/org/apache/tephra/distributed/PooledClientProviderTest.java ---
    @@ -137,15 +137,15 @@ public Boolean call() throws Exception {
     
     
         //Now race to get MAX_CLIENT_COUNT+1 clients, exhausting the pool and requesting 1 more.
    -    List<Future<Integer>> clientIds = new ArrayList<Future<Integer>>();
    -    CountDownLatch countDownLatch = new CountDownLatch(1);
    +    List<Future<Integer>> clientIds = new ArrayList<>();
    +    // we want to ensure that all clients have been exhausted before releasing any
    +    CountDownLatch countDownLatch = new CountDownLatch(MAX_CLIENT_COUNT);
    --- End diff --
    
    Would be good to call this `clientDoneLatch`


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-tephra pull request #8: Fix flaky test (PooledClientProviderTest)

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

    https://github.com/apache/incubator-tephra/pull/8


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-tephra pull request #8: Fix flaky test (PooledClientProviderTest)

Posted by anwar6953 <gi...@git.apache.org>.
Github user anwar6953 commented on a diff in the pull request:

    https://github.com/apache/incubator-tephra/pull/8#discussion_r78137565
  
    --- Diff: tephra-core/src/test/java/org/apache/tephra/distributed/PooledClientProviderTest.java ---
    @@ -137,15 +137,15 @@ public Boolean call() throws Exception {
     
     
         //Now race to get MAX_CLIENT_COUNT+1 clients, exhausting the pool and requesting 1 more.
    -    List<Future<Integer>> clientIds = new ArrayList<Future<Integer>>();
    -    CountDownLatch countDownLatch = new CountDownLatch(1);
    +    List<Future<Integer>> clientIds = new ArrayList<>();
    +    // we want to ensure that all clients have been exhausted before releasing any
    +    CountDownLatch countDownLatch = new CountDownLatch(MAX_CLIENT_COUNT);
    --- End diff --
    
    done


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-tephra issue #8: Fix flaky test (PooledClientProviderTest)

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

    https://github.com/apache/incubator-tephra/pull/8
  
    LGTM


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---