File tree Expand file tree Collapse file tree 1 file changed +17
-1
lines changed Expand file tree Collapse file tree 1 file changed +17
-1
lines changed Original file line number Diff line number Diff line change @@ -459,8 +459,24 @@ mod tests {
459459
460460 #[ test]
461461 fn test_graph_empty ( ) {
462+ let domain_id: usize = std:: env:: var ( "ROS_DOMAIN_ID" )
463+ . ok ( )
464+ . and_then ( |value| value. parse ( ) . ok ( ) )
465+ . map ( |value| {
466+ if value == 99 {
467+ // The default domain ID for this application is 99, which
468+ // conflicts with our arbitrarily chosen default for the
469+ // empty graph test. Therefore we will set the empty graph
470+ // test domain ID to 98 instead.
471+ 98
472+ } else {
473+ 99
474+ }
475+ } )
476+ . unwrap_or ( 99 ) ;
477+
462478 let context =
463- Context :: new_with_options ( [ ] , InitOptions :: new ( ) . with_domain_id ( Some ( 99 ) ) ) . unwrap ( ) ;
479+ Context :: new_with_options ( [ ] , InitOptions :: new ( ) . with_domain_id ( Some ( domain_id ) ) ) . unwrap ( ) ;
464480 let node_name = "test_publisher_names_and_types" ;
465481 let node = Node :: new ( & context, node_name) . unwrap ( ) ;
466482 // Test that the graph has no publishers
You can’t perform that action at this time.
0 commit comments