You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pulsar.apache.org by jai1 <gi...@git.apache.org> on 2017/06/29 00:14:24 UTC

[GitHub] incubator-pulsar pull request #539: C++ unit tests in less than a minute

GitHub user jai1 opened a pull request:

    https://github.com/apache/incubator-pulsar/pull/539

    C++ unit tests in less than a minute

    #537
    
    


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

    $ git pull https://github.com/jai1/pulsar gtest-parallel

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

    https://github.com/apache/incubator-pulsar/pull/539.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 #539
    
----
commit 32b665e40d7c3aec5767a17fa581c65a48c54e16
Author: Jai ASher <ja...@yahoo-inc.com>
Date:   2017-06-16T04:19:58Z

    C++ Client - Added stats for C++ Client

commit 45566fd599f222259426a251723afa014e12e88a
Author: Jai ASher <ja...@yahoo-inc.com>
Date:   2017-06-16T21:16:09Z

    C++ Client - Added ProducerStats

commit 2f3041568e879f1652aeeedc4fc60fb3e9ec6c3f
Author: Jai ASher <ja...@yahoo-inc.com>
Date:   2017-06-16T23:36:58Z

    Fixed test cases

commit 55e06c759b252e44ac5e9d95b0e9efc64ac077fb
Author: Jai ASher <ja...@yahoo-inc.com>
Date:   2017-06-17T03:55:10Z

    Addressed Maurice's PR comments

commit 9dda4bfbd899be89af7ae593a9eb654dc746da11
Author: Jai ASher <ja...@yahoo-inc.com>
Date:   2017-06-18T19:25:01Z

    Fixed close timer logic

commit 7693a80908245a1a509d343e7fb9248525febdde
Author: Jai ASher <ja...@yahoo-inc.com>
Date:   2017-06-20T00:07:33Z

    Addressed Maurice's PR comments

commit 4f06bd0db02ce3312f360e8e42ea858460dc2461
Author: Jai ASher <ja...@yahoo-inc.com>
Date:   2017-06-21T00:53:01Z

    Added Consumer Stats

commit ff11d2910958ece1c1d128b6bed1eaa563103de9
Author: Jai ASher <ja...@yahoo-inc.com>
Date:   2017-06-21T00:59:02Z

    Changed Destructor log level to DEBUG

commit 2c52ac9493c5ad6c765c1c78d9cbd4b26ee03dfa
Author: Jai ASher <ja...@yahoo-inc.com>
Date:   2017-06-21T01:31:59Z

    Fixed commas and semi colons in log messages

commit 8e687d676bdee049619d3f64430adb8bb7dafb4c
Author: Jai ASher <ja...@yahoo-inc.com>
Date:   2017-06-22T17:51:08Z

    Merge branch 'master' of https://github.com/yahoo/pulsar into CPPStats

commit 08920495100df704829a6416aa09291154748210
Author: Jai ASher <ja...@yahoo-inc.com>
Date:   2017-06-28T01:14:05Z

    Merge branch 'master' of https://github.com/yahoo/pulsar into CPPStats

commit 9acc5576c9bd15bfc154c214a8f5250f9d8f98e6
Author: Jai ASher <ja...@yahoo-inc.com>
Date:   2017-06-28T01:36:50Z

    Fixed headers

commit 815a76102a4d69883c8d0cc745331ec54043e5ea
Author: Jai ASher <ja...@yahoo-inc.com>
Date:   2017-06-28T21:13:19Z

    Fixed intermittent test failures

commit 28e7a079847a4278c83b93633d2e6f5c9c5c5a4c
Author: Jai ASher <ja...@yahoo-inc.com>
Date:   2017-06-28T21:56:31Z

    More intermittent Fixes

commit a6fef465b5371e13b6789ee2aa831de8702f3777
Author: Jai ASher <ja...@yahoo-inc.com>
Date:   2017-06-28T23:06:05Z

    Fixed tests for gtest-parallel

commit 047ec4ee175adfc8c932de8b23faa06b020bb08f
Author: Jai ASher <ja...@yahoo-inc.com>
Date:   2017-06-28T23:15:48Z

    Added travis-build.sh

----


---
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-pulsar pull request #539: C++ unit tests in less than a minute

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

    https://github.com/apache/incubator-pulsar/pull/539#discussion_r124690695
  
    --- Diff: pulsar-client-cpp/tests/BasicEndToEndTest.cc ---
    @@ -578,8 +578,13 @@ TEST(BasicEndToEndTest, testSinglePartitionRoutingPolicy)
             consumer.receive(m);
             consumer.acknowledgeCumulative(m);
         }
    +
    +    Promise<bool, Result> closePromise;
    +    Result r;
         consumer.close();
    -    producer.closeAsync(0);
    +    producer.closeAsync(WaitForCallback(closePromise));
    --- End diff --
    
    Couldn't you just use `producer.close()` here. That should be the exact same implementation internally.


---
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-pulsar pull request #539: C++ unit tests in less than a minute

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

    https://github.com/apache/incubator-pulsar/pull/539#discussion_r124853117
  
    --- Diff: pulsar-client-cpp/tests/BasicEndToEndTest.cc ---
    @@ -578,8 +578,13 @@ TEST(BasicEndToEndTest, testSinglePartitionRoutingPolicy)
             consumer.receive(m);
             consumer.acknowledgeCumulative(m);
         }
    +
    +    Promise<bool, Result> closePromise;
    +    Result r;
         consumer.close();
    -    producer.closeAsync(0);
    +    producer.closeAsync(WaitForCallback(closePromise));
    --- End diff --
    
    the implementation of `Producer.close()` is exactly the same, so it will exercise the same code path: 
    
    ```cpp
    Result Producer::close() {
        Promise<bool, Result> promise;
        closeAsync(WaitForCallback(promise));
    
        Result result;
        promise.getFuture().get(result);
        return result;
    }
    ```


---
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-pulsar pull request #539: C++ unit tests in less than a minute

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

    https://github.com/apache/incubator-pulsar/pull/539#discussion_r124726012
  
    --- Diff: pulsar-client-cpp/tests/BasicEndToEndTest.cc ---
    @@ -578,8 +578,13 @@ TEST(BasicEndToEndTest, testSinglePartitionRoutingPolicy)
             consumer.receive(m);
             consumer.acknowledgeCumulative(m);
         }
    +
    +    Promise<bool, Result> closePromise;
    +    Result r;
         consumer.close();
    -    producer.closeAsync(0);
    +    producer.closeAsync(WaitForCallback(closePromise));
    --- End diff --
    
    We can but closeAsync was used in an effort to increase code coverage of CPP Unit tests.


---
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-pulsar pull request #539: C++ unit tests in less than a minute

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

    https://github.com/apache/incubator-pulsar/pull/539#discussion_r124862843
  
    --- Diff: pulsar-client-cpp/tests/BasicEndToEndTest.cc ---
    @@ -811,9 +812,14 @@ TEST(BasicEndToEndTest, testMessageListenerPause)
         consumer.resumeMessageListener();
         // Sleeping for 2 seconds
         usleep(2 * 1000 * 1000);
    +    Promise<bool, Result> closePromise;
    --- End diff --
    
    You missed one ;)


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