Skip to content

Commit

Permalink
Fixed all the issues, I Hope
Browse files Browse the repository at this point in the history
  • Loading branch information
GauravKumar9920 committed Mar 19, 2024
1 parent 101c951 commit 668d178
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions test/integration/thruster.cc
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ void ThrusterTest::TestWorld(const std::string &_world,

// Check no movement because of invalid commands
fixture.Server()->Run(true, 100, false);
ASSERT_FALSE(modelPoses.Pos().X().empty())
ASSERT_FALSE(modelPoses.empty());
EXPECT_DOUBLE_EQ(0.0, modelPoses.back().Pos().X());
EXPECT_EQ(100u, modelPoses.size());
EXPECT_EQ(100u, propellerAngVels.size());
Expand Down Expand Up @@ -244,10 +244,9 @@ void ThrusterTest::TestWorld(const std::string &_world,

// Check movement
if (_namespace != "lowbattery")
{
ASSERT_FALSE(modelPoses.Pos().X().empty())
for (sleep = 0; (modelPoses.empty() || modelPoses.back().Pos().X() < 5.0) && sleep < maxSleep;
++sleep)
{
for (sleep = 0; (modelPoses.empty() || modelPoses.back().Pos().X() < 5.0) &&
sleep < maxSleep; ++sleep)
{
std::this_thread::sleep_for(std::chrono::milliseconds(100));
fixture.Server()->Run(true, 100, false);
Expand Down

0 comments on commit 668d178

Please sign in to comment.