Skip to content

Commit

Permalink
Increasing test count from timeout handling changes (#4234)
Browse files Browse the repository at this point in the history
Signed-off-by: Steve Macenski <stevenmacenski@gmail.com>
  • Loading branch information
SteveMacenski authored and christophfroehlich committed Jun 24, 2024
1 parent 7d7d462 commit 2ed5d0d
Showing 1 changed file with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -316,8 +316,10 @@ TEST_F(BTActionNodeTestFixture, test_server_timeout_success)
// the BT should have failed
EXPECT_EQ(result, BT::NodeStatus::FAILURE);

// since the server timeout is 20ms and bt loop duration is 10ms, number of ticks should be 2
EXPECT_EQ(ticks, 2);
// since the server timeout is 20ms and bt loop duration is 10ms, number of ticks should
// be at most 2, but it can be 1 too, because the tickOnce may execute two ticks.
EXPECT_LE(ticks, 3);
EXPECT_GE(ticks, 1);
}

TEST_F(BTActionNodeTestFixture, test_server_timeout_failure)
Expand Down Expand Up @@ -362,7 +364,7 @@ TEST_F(BTActionNodeTestFixture, test_server_timeout_failure)
EXPECT_EQ(result, BT::NodeStatus::FAILURE);

// since the server timeout is 90ms and bt loop duration is 10ms, number of ticks should be 9
EXPECT_EQ(ticks, 9);
EXPECT_EQ(ticks, 10);

// start a new execution cycle with the previous BT to ensure previous state doesn't leak into
// the new cycle
Expand Down

0 comments on commit 2ed5d0d

Please sign in to comment.