You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@curator.apache.org by oza <gi...@git.apache.org> on 2017/02/24 07:37:02 UTC

[GitHub] curator pull request #200: [CURATOR-311] SharedValue could hold stall data a...

GitHub user oza opened a pull request:

    https://github.com/apache/curator/pull/200

    [CURATOR-311] SharedValue could hold stall data after reconnecting

    This PR introduces to refresh data when client's state becomes ConnectionState.RECONNECTED.

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

    $ git pull https://github.com/oza/curator CURATOR-311

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

    https://github.com/apache/curator/pull/200.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 #200
    
----
commit 8c1c5ffa287d22eaea18bf6f89a4a8bf6d9b871c
Author: Tsuyoshi Ozawa <oz...@apache.org>
Date:   2017-01-11T11:30:46Z

    CURATOR-311 - SharedValue could hold stall data after reconnecting

----


---
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] curator pull request #200: [CURATOR-311] SharedValue could hold stall data a...

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

    https://github.com/apache/curator/pull/200#discussion_r102892185
  
    --- Diff: curator-recipes/src/test/java/org/apache/curator/framework/recipes/shared/TestSharedCount.java ---
    @@ -381,12 +385,122 @@ public void processResult(CuratorFramework client, CuratorEvent event) throws Ex
                 }).forPath("/count");
                 flushDone.await(5, TimeUnit.SECONDS);
     
    -            Assert.assertEquals(2, numChangeEvents.get());
    +            // CURATOR-311: when a Curator client's state became RECONNECTED, countHasChanged method is called back
    +            // because the Curator client calls readValueAndNotifyListenersInBackground in SharedValue#ConnectionStateListener#stateChanged.
    +            Assert.assertEquals(numChangeEvents.get(), 3);
    --- End diff --
    
    Minor nits: this line also fixes wrong order of the argument of Assert.assertEquals: assertEquals(actual, expected)  is correct one.
    
    To confirm the reason why I changed numChangeEvents' count, please check the comment in the test code.


---
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] curator pull request #200: [CURATOR-311] SharedValue could hold stall data a...

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

    https://github.com/apache/curator/pull/200


---
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] curator issue #200: [CURATOR-311] SharedValue could hold stall data after re...

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

    https://github.com/apache/curator/pull/200
  
    @Randgalt could you take a look when you have a time? I'm sorry if I'm missing something in previous PR. 


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