@@ -9,7 +9,7 @@ use rosidl_runtime_rs::Sequence;
9
9
use super :: ParameterMap ;
10
10
use crate :: {
11
11
parameter:: { DeclaredValue , ParameterKind , ParameterStorage } ,
12
- rmw_request_id_t , IntoPrimitiveOptions , Node , QoSProfile , RclrsError , Service ,
12
+ IntoPrimitiveOptions , Node , QoSProfile , RclrsError , Service ,
13
13
} ;
14
14
15
15
// The variables only exist to keep a strong reference to the services and are technically unused.
@@ -437,11 +437,13 @@ mod tests {
437
437
!not_finished
438
438
} ) ;
439
439
440
- executor. spin (
441
- SpinOptions :: new ( )
442
- . until_promise_resolved ( promise)
443
- . timeout ( Duration :: from_secs ( 1 ) ) ,
444
- ) ;
440
+ executor
441
+ . spin (
442
+ SpinOptions :: new ( )
443
+ . until_promise_resolved ( promise)
444
+ . timeout ( Duration :: from_secs ( 1 ) ) ,
445
+ )
446
+ . unwrap ( ) ;
445
447
446
448
Ok ( ( ) )
447
449
}
@@ -453,11 +455,13 @@ mod tests {
453
455
client_node. create_client :: < ListParameters > ( "/list/node/list_parameters" ) ?;
454
456
455
457
// return Ok(());
456
- executor. spin (
457
- SpinOptions :: default ( )
458
- . until_promise_resolved ( list_client. notify_on_service_ready ( ) )
459
- . timeout ( Duration :: from_secs ( 2 ) ) ,
460
- ) ;
458
+ executor
459
+ . spin (
460
+ SpinOptions :: default ( )
461
+ . until_promise_resolved ( list_client. notify_on_service_ready ( ) )
462
+ . timeout ( Duration :: from_secs ( 2 ) ) ,
463
+ )
464
+ . unwrap ( ) ;
461
465
462
466
// List all parameters
463
467
let callback_ran = Arc :: new ( AtomicBool :: new ( false ) ) ;
@@ -484,11 +488,13 @@ mod tests {
484
488
} )
485
489
. unwrap ( ) ;
486
490
487
- executor. spin (
488
- SpinOptions :: default ( )
489
- . until_promise_resolved ( promise)
490
- . timeout ( Duration :: from_secs ( 5 ) ) ,
491
- ) ;
491
+ executor
492
+ . spin (
493
+ SpinOptions :: default ( )
494
+ . until_promise_resolved ( promise)
495
+ . timeout ( Duration :: from_secs ( 5 ) ) ,
496
+ )
497
+ . unwrap ( ) ;
492
498
assert ! ( callback_ran. load( Ordering :: Acquire ) ) ;
493
499
494
500
// Limit depth, namespaced parameter is not returned
@@ -508,7 +514,9 @@ mod tests {
508
514
} )
509
515
. unwrap ( ) ;
510
516
511
- executor. spin ( SpinOptions :: default ( ) . until_promise_resolved ( promise) ) ;
517
+ executor
518
+ . spin ( SpinOptions :: default ( ) . until_promise_resolved ( promise) )
519
+ . unwrap ( ) ;
512
520
assert ! ( callback_ran. load( Ordering :: Acquire ) ) ;
513
521
514
522
// Filter by prefix, just return the requested one with the right prefix
@@ -529,7 +537,9 @@ mod tests {
529
537
} )
530
538
. unwrap ( ) ;
531
539
532
- executor. spin ( SpinOptions :: default ( ) . until_promise_resolved ( promise) ) ;
540
+ executor
541
+ . spin ( SpinOptions :: default ( ) . until_promise_resolved ( promise) )
542
+ . unwrap ( ) ;
533
543
assert ! ( callback_ran. load( Ordering :: Acquire ) ) ;
534
544
535
545
// If prefix is equal to names, parameters should be returned
@@ -550,7 +560,9 @@ mod tests {
550
560
} )
551
561
. unwrap ( ) ;
552
562
553
- executor. spin ( SpinOptions :: default ( ) . until_promise_resolved ( promise) ) ;
563
+ executor
564
+ . spin ( SpinOptions :: default ( ) . until_promise_resolved ( promise) )
565
+ . unwrap ( ) ;
554
566
assert ! ( callback_ran. load( Ordering :: Acquire ) ) ;
555
567
556
568
Ok ( ( ) )
@@ -578,7 +590,9 @@ mod tests {
578
590
let clients_ready = client_node
579
591
. notify_on_graph_change_with_period ( Duration :: from_millis ( 1 ) , clients_ready_condition) ;
580
592
581
- executor. spin ( SpinOptions :: default ( ) . until_promise_resolved ( clients_ready) ) ;
593
+ executor
594
+ . spin ( SpinOptions :: default ( ) . until_promise_resolved ( clients_ready) )
595
+ . unwrap ( ) ;
582
596
583
597
// Get an existing parameter
584
598
let callback_ran = Arc :: new ( AtomicBool :: new ( false ) ) ;
@@ -596,7 +610,9 @@ mod tests {
596
610
} )
597
611
. unwrap ( ) ;
598
612
599
- executor. spin ( SpinOptions :: default ( ) . until_promise_resolved ( promise) ) ;
613
+ executor
614
+ . spin ( SpinOptions :: default ( ) . until_promise_resolved ( promise) )
615
+ . unwrap ( ) ;
600
616
assert ! ( callback_ran. load( Ordering :: Acquire ) ) ;
601
617
602
618
// Getting both existing and non existing parameters, missing one should return
@@ -617,7 +633,9 @@ mod tests {
617
633
} )
618
634
. unwrap ( ) ;
619
635
620
- executor. spin ( SpinOptions :: default ( ) . until_promise_resolved ( promise) ) ;
636
+ executor
637
+ . spin ( SpinOptions :: default ( ) . until_promise_resolved ( promise) )
638
+ . unwrap ( ) ;
621
639
assert ! ( callback_ran. load( Ordering :: Acquire ) ) ;
622
640
623
641
// Set a mix of existing, non existing, dynamic and out of range parameters
@@ -717,7 +735,9 @@ mod tests {
717
735
} )
718
736
. unwrap ( ) ;
719
737
720
- executor. spin ( SpinOptions :: default ( ) . until_promise_resolved ( promise) ) ;
738
+ executor
739
+ . spin ( SpinOptions :: default ( ) . until_promise_resolved ( promise) )
740
+ . unwrap ( ) ;
721
741
assert ! ( callback_ran. load( Ordering :: Acquire ) ) ;
722
742
723
743
// Set the node to use undeclared parameters and try to set one
@@ -746,7 +766,9 @@ mod tests {
746
766
} )
747
767
. unwrap ( ) ;
748
768
749
- executor. spin ( SpinOptions :: default ( ) . until_promise_resolved ( promise) ) ;
769
+ executor
770
+ . spin ( SpinOptions :: default ( ) . until_promise_resolved ( promise) )
771
+ . unwrap ( ) ;
750
772
assert ! ( callback_ran. load( Ordering :: Acquire ) ) ;
751
773
752
774
// With set_parameters_atomically, if one fails all should fail
@@ -765,7 +787,9 @@ mod tests {
765
787
)
766
788
. unwrap ( ) ;
767
789
768
- executor. spin ( SpinOptions :: default ( ) . until_promise_resolved ( promise) ) ;
790
+ executor
791
+ . spin ( SpinOptions :: default ( ) . until_promise_resolved ( promise) )
792
+ . unwrap ( ) ;
769
793
assert ! ( callback_ran. load( Ordering :: Acquire ) ) ;
770
794
771
795
Ok ( ( ) )
@@ -789,7 +813,9 @@ mod tests {
789
813
let promise = client_node
790
814
. notify_on_graph_change_with_period ( Duration :: from_millis ( 1 ) , clients_ready_condition) ;
791
815
792
- executor. spin ( SpinOptions :: default ( ) . until_promise_resolved ( promise) ) ;
816
+ executor
817
+ . spin ( SpinOptions :: default ( ) . until_promise_resolved ( promise) )
818
+ . unwrap ( ) ;
793
819
794
820
// Describe all parameters
795
821
let request = DescribeParameters_Request {
@@ -836,7 +862,9 @@ mod tests {
836
862
} )
837
863
. unwrap ( ) ;
838
864
839
- executor. spin ( SpinOptions :: default ( ) . until_promise_resolved ( promise) ) ;
865
+ executor
866
+ . spin ( SpinOptions :: default ( ) . until_promise_resolved ( promise) )
867
+ . unwrap ( ) ;
840
868
assert ! ( callback_ran. load( Ordering :: Acquire ) ) ;
841
869
842
870
// If a describe parameters request is sent with a non existing parameter, an empty
@@ -860,7 +888,9 @@ mod tests {
860
888
} )
861
889
. unwrap ( ) ;
862
890
863
- executor. spin ( SpinOptions :: default ( ) . until_promise_resolved ( promise) ) ;
891
+ executor
892
+ . spin ( SpinOptions :: default ( ) . until_promise_resolved ( promise) )
893
+ . unwrap ( ) ;
864
894
assert ! ( callback_ran. load( Ordering :: Acquire ) ) ;
865
895
866
896
// Get all parameter types, including a non existing one that will be NOT_SET
@@ -888,7 +918,9 @@ mod tests {
888
918
} )
889
919
. unwrap ( ) ;
890
920
891
- executor. spin ( SpinOptions :: default ( ) . until_promise_resolved ( promise) ) ;
921
+ executor
922
+ . spin ( SpinOptions :: default ( ) . until_promise_resolved ( promise) )
923
+ . unwrap ( ) ;
892
924
assert ! ( callback_ran. load( Ordering :: Acquire ) ) ;
893
925
894
926
Ok ( ( ) )
0 commit comments