Skip to content

Commit

Permalink
Also test deprecated interface
Browse files Browse the repository at this point in the history
  • Loading branch information
fmauch committed Sep 4, 2023
1 parent 690a568 commit eae95f3
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions tests/test_tcp_socket.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,11 @@
#include <chrono>
#include <condition_variable>
#include <cstddef>
#include <ratio>

// This file adds a test for a deprecated function. To avoid a compiler warning in CI (where we want
// to treat warnings as errors) we suppress the warning inside this file.
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
#include <ur_client_library/comm/tcp_socket.h>
#include <ur_client_library/comm/tcp_server.h>
#include "ur_client_library/types.h"
Expand Down Expand Up @@ -357,6 +361,12 @@ TEST_F(TCPSocketTest, connect_non_running_robot)
EXPECT_LT(elapsed, std::chrono::milliseconds(1500));
}

TEST_F(TCPSocketTest, test_deprecated_reconnection_time_interface)
{
client_->setReconnectionTime(std::chrono::milliseconds(100));
EXPECT_TRUE(client_->setup(2));
}

int main(int argc, char* argv[])
{
::testing::InitGoogleTest(&argc, argv);
Expand Down

0 comments on commit eae95f3

Please sign in to comment.