Skip to content

Commit

Permalink
fix: Fixed expected test result in case of rmw_connextdds
Browse files Browse the repository at this point in the history
Signed-off-by: Janosch Machowinski <J.Machowinski@cellumation.com>
  • Loading branch information
Janosch Machowinski authored and Janosch Machowinski committed Apr 10, 2024
1 parent e4a9842 commit 7154b5a
Showing 1 changed file with 18 additions and 3 deletions.
Expand Up @@ -137,7 +137,22 @@ TEST_F(RecordIntegrationTestFixture, record_all_with_sim_time)
// check that the timestamp is same as the clock message
EXPECT_THAT(string_messages[0]->recv_timestamp, time_value);

// Check that the send_timestamp is not the same as the clock message
EXPECT_NE(string_messages[0]->send_timestamp, time_value);
EXPECT_NE(string_messages[0]->send_timestamp, 0);
bool rwm_has_timestamp_support = true;

#ifdef _WIN32
if (std::string(rmw_get_implementation_identifier()).find("rmw_connextdds") !=
std::string::npos)
{
rwm_has_timestamp_support = false;
}
#endif

if (rwm_has_timestamp_support) {
// Check that the send_timestamp is not the same as the clock message
EXPECT_NE(string_messages[0]->send_timestamp, time_value);
EXPECT_NE(string_messages[0]->send_timestamp, 0);
} else {
// if rwm has not timestamp support, send_timestamp must be zero
EXPECT_EQ(string_messages[0]->send_timestamp, 0);
}
}

0 comments on commit 7154b5a

Please sign in to comment.