Skip to content

Commit fd82a3c

Browse files
committed
add test for ignoring warnings
try to fix the ones not working in CI
1 parent 2179c01 commit fd82a3c

1 file changed

Lines changed: 12 additions & 3 deletions

File tree

tests/test_primary_client.cpp

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -491,16 +491,16 @@ TEST_F(PrimaryClientTest, test_send_script_blocking_fail_on_runtime_exception)
491491
EXPECT_NO_THROW(client_->commandPowerOff());
492492
EXPECT_NO_THROW(client_->commandBrakeRelease());
493493
// Non-invertible goal, should throw runtime exception
494-
EXPECT_FALSE(client_->sendScriptBlocking("movej(p[0,0,0,0,0,0])"));
494+
EXPECT_FALSE(client_->sendScriptBlocking("movej(p[10,0,0,0,0,0])"));
495495
}
496496

497497
TEST_F(PrimaryClientTest, test_send_script_blocking_fail_on_robot_errors)
498498
{
499499
EXPECT_NO_THROW(client_->start());
500500
EXPECT_NO_THROW(client_->commandPowerOff());
501501
EXPECT_NO_THROW(client_->commandBrakeRelease());
502-
// Impossible movement, will trigger an error and protective stop
503-
EXPECT_FALSE(client_->sendScriptBlocking("movel(p[0,0,0,0,0,0])"));
502+
// Impossible movement, will trigger a warning and protective stop
503+
EXPECT_FALSE(client_->sendScriptBlocking("movel(p[10,0,0,0,0,0])"));
504504
// reset the robot
505505
client_->commandUnlockProtectiveStop();
506506
EXPECT_TRUE(client_->sendScriptBlocking("movej([0,0,0,0,0,0])"));
@@ -521,6 +521,15 @@ TEST_F(PrimaryClientTest, test_send_script_blocking_fail_on_bad_script)
521521
EXPECT_FALSE(client_->sendScriptBlocking(script_code));
522522
}
523523

524+
TEST_F(PrimaryClientTest, test_send_script_blocking_ignore_warnings)
525+
{
526+
EXPECT_NO_THROW(client_->start());
527+
EXPECT_NO_THROW(client_->commandPowerOff());
528+
EXPECT_NO_THROW(client_->commandBrakeRelease());
529+
// Impossible movement, will trigger an error and protective stop
530+
EXPECT_TRUE(client_->sendScriptBlocking("movel(p[10,0,0,0,0,0])", "", std::chrono::seconds(1), false));
531+
}
532+
524533
int main(int argc, char* argv[])
525534
{
526535
::testing::InitGoogleTest(&argc, argv);

0 commit comments

Comments
 (0)