intel / dps-for-iot

Other
61 stars 23 forks source link

Fix order in discovery match test. #125

Closed malsbat closed 4 years ago

malsbat commented 4 years ago

Prior to this fix, the match test checked if the subscription topics included the publication topics. This failed noticeably when the publication included the wildcarded topics.

With this fix, the correct check is performed (publication includes subscription) and the discovery code creates the link.

Signed-off-by: Todd Malsbary todd.malsbary@intel.com

talih0 commented 4 years ago

This only works if the published discovery message is a single topic (i.e. $DPS/Discovery in the unit test). In rmw_dps all the subscriber's topics are bundled as a union in the interests message (src/rmw_node.cpp:246), so it doesn't work there.

malsbat commented 4 years ago

Good catch. After some more spelunking, it looks like https://github.com/intel/dps-for-iot/commit/bdd8141fd3d319bb30d69fb4a8780d1bfbed95f9#diff-c4222b6e4ae03ce423373dc35823ea63 is the change that introduced the regression by removing the needs component.