diff --git a/test/testmonpipe.cpp b/test/testmonpipe.cpp index 7bf493c..7e3af8c 100644 --- a/test/testmonpipe.cpp +++ b/test/testmonpipe.cpp @@ -97,7 +97,8 @@ struct Spammer : public server::Source { } }; -void testSpam(uint32_t nQueue, uint32_t highMark, uint16_t lastVal) +void testSpam(uint32_t nQueue, uint32_t highMark, uint16_t lastVal, + const std::string& ackAny="") { testShow()<<__func__<<" nQueue="< mon; + { + auto b(cli.monitor("spam") + .record("highMark", highMark) + .record("queueSize", nQueue) + .record("lastVal", lastVal) + .record("pipeline", true) + .maskConnected(true) + .maskDisconnected(true) + .event([&wait](client::Subscription&){ + wait.signal(); + })); + if(!ackAny.empty()) { + b.record("ackAny", ackAny); + } + mon = b.exec(); + } uint16_t expected = 0u; while(true) { @@ -145,7 +152,7 @@ void testSpam(uint32_t nQueue, uint32_t highMark, uint16_t lastVal) MAIN(testmonpipe) { - testPlan(99); + testPlan(111); testSetup(); logger_config_env(); testSpam(3u, 0u, 7u); @@ -157,6 +164,7 @@ MAIN(testmonpipe) testSpam(4u, 3u, 10u); testSpam(4u, 4u, 10u); testSpam(4u, 6u, 10u); + testSpam(4u, 6u, 10u, "50%"); logger_config_env(); cleanup_for_valgrind(); return testDone();