File tree Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Original file line number Diff line number Diff line change 3232
3333#include < ur_client_library/ur/dashboard_client.h>
3434#include < thread>
35+ #include " ur_client_library/log.h"
3536#define private public
3637#include < ur_client_library/ur/ur_driver.h>
3738#include < ur_client_library/example_robot_wrapper.h>
@@ -268,6 +269,19 @@ TEST_F(UrDriverTest, read_error_code)
268269 EXPECT_TRUE (g_my_robot->dashboard_client_ ->commandUnlockProtectiveStop ());
269270}
270271
272+ TEST (UrDriverInitTest, setting_connection_limits_works_correctly)
273+ {
274+ UrDriverConfiguration config;
275+ config.socket_reconnect_attempts = 1 ;
276+ config.socket_reconnection_timeout = std::chrono::milliseconds (200 );
277+ config.robot_ip = " 192.168.56.100" ; // That IP address should not exist on the test network
278+ config.input_recipe_file = INPUT_RECIPE;
279+ config.output_recipe_file = OUTPUT_RECIPE;
280+ config.headless_mode = g_HEADLESS;
281+
282+ EXPECT_THROW (UrDriver ur_driver (config), UrException);
283+ }
284+
271285// TODO we should add more tests for the UrDriver class.
272286
273287int main (int argc, char * argv[])
You can’t perform that action at this time.
0 commit comments