Skip to content

Commit

Permalink
removed checks for sequence id, see issue ros2#49
Browse files Browse the repository at this point in the history
Signed-off-by: Jan Staschulat <[email protected]>
Signed-off-by: BrettRD <[email protected]>
  • Loading branch information
JanStaschulat authored and BrettRD committed Jul 5, 2021
1 parent f9c4a5e commit abd1d01
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 7 deletions.
2 changes: 0 additions & 2 deletions rclc/test/rclc/test_client.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@ TEST(Test, rclc_client_init_default) {
// Check that there were no errors while sending the request.
int64_t sequence_number = 0;
rc = rcl_send_request(&client, &req, &sequence_number);
// EXPECT_EQ(sequence_number, 1);
EXPECT_EQ(RCL_RET_OK, rc) << rcl_get_error_string().str;
test_msgs__srv__BasicTypes_Request__fini(&req);

Expand Down Expand Up @@ -110,7 +109,6 @@ TEST(Test, rclc_client_init_best_effort) {
// Check that there were no errors while sending the request.
int64_t sequence_number = 0;
rc = rcl_send_request(&client, &req, &sequence_number);
// EXPECT_EQ(sequence_number, 1);
EXPECT_EQ(RCL_RET_OK, rc) << rcl_get_error_string().str;
test_msgs__srv__BasicTypes_Request__fini(&req);

Expand Down
6 changes: 1 addition & 5 deletions rclc/test/rclc/test_executor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1878,7 +1878,6 @@ TEST_F(TestDefaultExecutor, executor_test_service) {
cli_req.b = 2;
rc = rcl_send_request(&client, &cli_req, &seq);
EXPECT_EQ(RCL_RET_OK, rc) << rcl_get_error_string().str;
// EXPECT_EQ(seq, (int64_t) 1); // sequence id = 1

// initialize test results
_results_initialize_service_client();
Expand Down Expand Up @@ -1977,7 +1976,6 @@ TEST_F(TestDefaultExecutor, executor_test_service_with_reqid) {
cli_req.b = 2;
rc = rcl_send_request(&client, &cli_req, &seq);
EXPECT_EQ(RCL_RET_OK, rc) << rcl_get_error_string().str;
// EXPECT_EQ(seq, (int64_t) 1); // sequence id = 1

// initialize test results
_results_initialize_service_client();
Expand All @@ -1994,7 +1992,6 @@ TEST_F(TestDefaultExecutor, executor_test_service_with_reqid) {

EXPECT_EQ(srv1_cnt, (unsigned int) 1); // check that service callback was called
EXPECT_EQ(srv1_value, (unsigned int) 1); // check value of 'a' in request message
// EXPECT_EQ(srv1_id, (unsigned int) 1); // check sequence id

// spin executor, which will
// - receive response message from server
Expand Down Expand Up @@ -2081,7 +2078,6 @@ TEST_F(TestDefaultExecutor, executor_test_service_with_context) {
cli_req.b = 2;
rc = rcl_send_request(&client, &cli_req, &seq);
EXPECT_EQ(RCL_RET_OK, rc) << rcl_get_error_string().str;
// EXPECT_EQ(seq, (int64_t) 1); // sequence id = 1

// initialize test results
_results_initialize_service_client();
Expand All @@ -2098,7 +2094,7 @@ TEST_F(TestDefaultExecutor, executor_test_service_with_context) {

EXPECT_EQ(srv1_cnt, (unsigned int) 1); // check that service callback was called
EXPECT_EQ(srv1_value, (unsigned int) 1); // check value of 'a' in request message
EXPECT_EQ(srv1_ctxt, (unsigned int) 42); // check sequence id
EXPECT_EQ(srv1_ctxt, (unsigned int) 42); // check context value

// spin executor, which will
// - receive response message from server
Expand Down

0 comments on commit abd1d01

Please sign in to comment.