zookeeper-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From afine <...@git.apache.org>
Subject [GitHub] zookeeper pull request #451: ZOOKEEPER-2184: Zookeeper Client should re-reso...
Date Thu, 15 Feb 2018 19:13:50 GMT
Github user afine commented on a diff in the pull request:

    https://github.com/apache/zookeeper/pull/451#discussion_r168572502
  
    --- Diff: src/java/test/org/apache/zookeeper/test/ClientPortBindTest.java ---
    @@ -104,7 +104,7 @@ public void testBindByAddress() throws Exception {
             try {
                 startSignal.await(CONNECTION_TIMEOUT,
                         TimeUnit.MILLISECONDS);
    -            Assert.assertTrue("count == 0", startSignal.getCount() == 0);
    +            Assert.assertTrue("count == " + startSignal.getCount(), startSignal.getCount()
== 0);
    --- End diff --
    
    I'm not a huge fan of calling `getCount` more than once, since I think the value could
change between invocations. Why not just use the return value from `await` in the line above?



---

Mime
View raw message