File tree Expand file tree Collapse file tree 1 file changed +21
-0
lines changed
rosbag2_transport/test/rosbag2_transport Expand file tree Collapse file tree 1 file changed +21
-0
lines changed Original file line number Diff line number Diff line change 1717#include < string>
1818#include < vector>
1919
20+ #include " rmw/types.h"
21+
2022#include " qos.hpp"
2123
2224TEST (TestQoS, serialization)
@@ -77,3 +79,22 @@ TEST(TestQoS, supports_version_4)
7779 // Any values not present in the YAML should take the default value in both profiles
7880 EXPECT_EQ (actual_qos, expected_qos);
7981}
82+
83+ TEST (TestQoS, detect_new_qos_fields)
84+ {
85+ // By trying to construct a profile explicitly by fields, the build fails if policies are added
86+ // This build failure indicates that we need to update QoS serialization in rosbag2_transport
87+ rmw_time_t notime{0 , 0 };
88+ rmw_qos_profile_t profile{
89+ RMW_QOS_POLICY_HISTORY_SYSTEM_DEFAULT,
90+ 10 ,
91+ RMW_QOS_POLICY_RELIABILITY_SYSTEM_DEFAULT,
92+ RMW_QOS_POLICY_DURABILITY_SYSTEM_DEFAULT,
93+ notime,
94+ notime,
95+ RMW_QOS_POLICY_LIVELINESS_SYSTEM_DEFAULT,
96+ notime,
97+ false ,
98+ };
99+ EXPECT_EQ (profile.history , RMW_QOS_POLICY_HISTORY_SYSTEM_DEFAULT); // fix "unused variable"
100+ }
You can’t perform that action at this time.
0 commit comments