@@ -3600,7 +3600,12 @@ format(Config) ->
36003600 % % tests rabbit_quorum_queue:format/2
36013601 Nodes = rabbit_ct_broker_helpers :get_node_configs (Config , nodename ),
36023602
3603- Server = hd (Nodes ),
3603+ Server = case Nodes of
3604+ [N ] ->
3605+ N ;
3606+ [_ , N | _ ] ->
3607+ N
3608+ end ,
36043609
36053610 Ch = rabbit_ct_client_helpers :open_channel (Config , Server ),
36063611 Q = ? config (queue_name , Config ),
@@ -3619,7 +3624,9 @@ format(Config) ->
36193624 ? FUNCTION_NAME , [QRecord , #{}]),
36203625
36213626 % % test all up case
3622- ? assertEqual (<<" quorum" >>, proplists :get_value (type , Fmt )),
3627+ ? assertMatch (
3628+ T when T =:= <<" quorum" >> orelse T =:= quorum ,
3629+ proplists :get_value (type , Fmt )),
36233630 ? assertEqual (running , proplists :get_value (state , Fmt )),
36243631 ? assertEqual (Server , proplists :get_value (leader , Fmt )),
36253632 ? assertEqual (Server , proplists :get_value (node , Fmt )),
@@ -3628,15 +3635,17 @@ format(Config) ->
36283635
36293636 case length (Nodes ) of
36303637 3 ->
3631- [_ , Server2 , Server3 ] = Nodes ,
3632- ok = rabbit_control_helper :command (stop_app , Server2 ),
3638+ [Server1 , _Server2 , Server3 ] = Nodes ,
3639+ ok = rabbit_control_helper :command (stop_app , Server1 ),
36333640 ok = rabbit_control_helper :command (stop_app , Server3 ),
36343641
36353642 Fmt2 = rabbit_ct_broker_helpers :rpc (Config , Server , rabbit_quorum_queue ,
36363643 ? FUNCTION_NAME , [QRecord , #{}]),
3637- ok = rabbit_control_helper :command (start_app , Server2 ),
3644+ ok = rabbit_control_helper :command (start_app , Server1 ),
36383645 ok = rabbit_control_helper :command (start_app , Server3 ),
3639- ? assertEqual (<<" quorum" >>, proplists :get_value (type , Fmt2 )),
3646+ ? assertMatch (
3647+ T when T =:= <<" quorum" >> orelse T =:= quorum ,
3648+ proplists :get_value (type , Fmt2 )),
36403649 ? assertEqual (minority , proplists :get_value (state , Fmt2 )),
36413650 ? assertEqual (Server , proplists :get_value (leader , Fmt2 )),
36423651 ? assertEqual (Server , proplists :get_value (node , Fmt2 )),
0 commit comments