mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-14 14:53:34 +08:00
More debug outputs
This commit is contained in:
@@ -105,10 +105,14 @@ TEST(ServiceClient, Basic)
|
||||
root_ns_a::StringService::Request request;
|
||||
request.string_request = "Hello world";
|
||||
|
||||
std::cout << "!!! Calling!" << std::endl;
|
||||
|
||||
ASSERT_LT(0, client1.call(1, request)); // OK
|
||||
ASSERT_LT(0, client2.call(1, request)); // OK
|
||||
ASSERT_LT(0, client3.call(99, request)); // Will timeout!
|
||||
|
||||
std::cout << "!!! Spinning!" << std::endl;
|
||||
|
||||
ASSERT_EQ(3, nodes.b.getDispatcher().getNumServiceResponseListeners()); // Listening now!
|
||||
|
||||
ASSERT_TRUE(client1.hasPendingCalls());
|
||||
@@ -117,6 +121,8 @@ TEST(ServiceClient, Basic)
|
||||
|
||||
nodes.spinBoth(uavcan::MonotonicDuration::fromMSec(20));
|
||||
|
||||
std::cout << "!!! Spin finished!" << std::endl;
|
||||
|
||||
ASSERT_EQ(1, nodes.b.getDispatcher().getNumServiceResponseListeners()); // Third is still listening!
|
||||
|
||||
ASSERT_FALSE(client1.hasPendingCalls());
|
||||
|
||||
Reference in New Issue
Block a user