| 107 | /****************TESTS START HERE***************************/ |
| 108 | |
| 109 | TEST_F(DeadlineTest, DeadlineTriggeredTest) |
| 110 | { |
| 111 | BT::NodeStatus state = root.executeTick(); |
| 112 | // Action takes longer than deadline, so it should timeout |
| 113 | |
| 114 | ASSERT_EQ(NodeStatus::RUNNING, action.status()); |
| 115 | ASSERT_EQ(NodeStatus::RUNNING, state); |
| 116 | |
| 117 | std::this_thread::sleep_for(ACTION_LONG_MS + milliseconds(20)); |
| 118 | state = root.executeTick(); |
| 119 | ASSERT_EQ(NodeStatus::FAILURE, state); |
| 120 | ASSERT_EQ(NodeStatus::IDLE, action.status()); |
| 121 | } |
| 122 | |
| 123 | TEST_F(DeadlineTest, DeadlineNotTriggeredTest) |
| 124 | { |
nothing calls this directly
no test coverage detected