Skip to content

Commit 6ee15d3

Browse files
committed
Use wrapper's resend function
1 parent bafa46a commit 6ee15d3

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

tests/test_instruction_executor.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,7 @@ TEST_F(InstructionExecutorTest, sending_commands_without_reverse_interface_conne
197197
ASSERT_FALSE(executor_->executeMotion(motion_sequence));
198198

199199
// Disconnect mid-motion
200-
g_my_robot->ur_driver_->sendRobotProgram();
200+
g_my_robot->resendRobotProgram();
201201
ASSERT_TRUE(g_my_robot->waitForProgramRunning(1000));
202202

203203
// move to first pose

tests/test_ur_driver.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ class UrDriverTest : public ::testing::Test
5151
static void SetUpTestSuite()
5252
{
5353
// Setup driver
54-
bool headless_mode = true;
54+
bool headless_mode = false;
5555
g_my_robot = std::make_unique<ExampleRobotWrapper>(g_ROBOT_IP, OUTPUT_RECIPE, INPUT_RECIPE, headless_mode,
5656
"external_control.urp", SCRIPT_FILE);
5757

@@ -99,7 +99,7 @@ TEST_F(UrDriverTest, robot_receive_timeout)
9999
EXPECT_TRUE(g_my_robot->waitForProgramNotRunning(400));
100100

101101
// Start robot program
102-
g_my_robot->ur_driver_->sendRobotProgram();
102+
g_my_robot->resendRobotProgram();
103103
EXPECT_TRUE(g_my_robot->waitForProgramRunning(1000));
104104

105105
// Robot program should time out after the robot receive timeout, whether it takes exactly 200 ms is not so important
@@ -108,7 +108,7 @@ TEST_F(UrDriverTest, robot_receive_timeout)
108108
EXPECT_TRUE(g_my_robot->waitForProgramNotRunning(400));
109109

110110
// Start robot program
111-
g_my_robot->ur_driver_->sendRobotProgram();
111+
g_my_robot->resendRobotProgram();
112112
EXPECT_TRUE(g_my_robot->waitForProgramRunning(1000));
113113

114114
// Robot program should time out after the robot receive timeout, whether it takes exactly 200 ms is not so important
@@ -117,7 +117,7 @@ TEST_F(UrDriverTest, robot_receive_timeout)
117117
EXPECT_TRUE(g_my_robot->waitForProgramNotRunning(400));
118118

119119
// Start robot program
120-
g_my_robot->ur_driver_->sendRobotProgram();
120+
g_my_robot->resendRobotProgram();
121121
EXPECT_TRUE(g_my_robot->waitForProgramRunning(1000));
122122

123123
// Robot program should time out after the robot receive timeout, whether it takes exactly 200 ms is not so important
@@ -226,14 +226,14 @@ TEST_F(UrDriverTest, target_outside_limits_pose)
226226
TEST_F(UrDriverTest, send_robot_program_retry_on_failure)
227227
{
228228
// Start robot program
229-
g_my_robot->ur_driver_->sendRobotProgram();
229+
g_my_robot->resendRobotProgram();
230230
EXPECT_TRUE(g_my_robot->waitForProgramRunning(1000));
231231

232232
// Check that sendRobotProgram is robust to the secondary stream being disconnected. This is what happens when
233233
// switching from Remote to Local and back to Remote mode for example.
234234
g_my_robot->ur_driver_->secondary_stream_->close();
235235

236-
EXPECT_TRUE(g_my_robot->ur_driver_->sendRobotProgram());
236+
EXPECT_TRUE(g_my_robot->resendRobotProgram());
237237
}
238238

239239
TEST_F(UrDriverTest, reset_rtde_client)

0 commit comments

Comments
 (0)