@@ -40,7 +40,8 @@ groups() ->
40
40
invoke ,
41
41
gen_server2_stats ,
42
42
negative_max_priorities ,
43
- max_priorities_above_hard_limit
43
+ max_priorities_above_hard_limit ,
44
+ update_rates
44
45
]}
45
46
].
46
47
@@ -473,6 +474,24 @@ unknown_info_key(Config) ->
473
474
rabbit_ct_client_helpers :close_connection (Conn ),
474
475
passed .
475
476
477
+ update_rates (Config ) ->
478
+ Node = rabbit_ct_broker_helpers :get_node_config (Config , 0 , nodename ),
479
+ {Conn , Ch } = rabbit_ct_client_helpers :open_connection_and_channel (Config , 0 ),
480
+ Q = <<" update_rates-queue" >>,
481
+ declare (Ch , Q , [{<<" x-max-priority" >>, byte , 3 }]),
482
+ QPid = queue_pid (Config , Node , rabbit_misc :r (<<" /" >>, queue , Q )),
483
+ try
484
+ publish1 (Ch , Q , 1 ),
485
+ QPid ! update_rates ,
486
+ State = get_state (Config , Q ),
487
+ ? assertEqual (live , State ),
488
+ delete (Ch , Q )
489
+ after
490
+ rabbit_ct_client_helpers :close_channel (Ch ),
491
+ rabbit_ct_client_helpers :close_connection (Conn ),
492
+ passed
493
+ end .
494
+
476
495
% %----------------------------------------------------------------------------
477
496
478
497
declare (Ch , Q , Args ) when is_list (Args ) ->
@@ -590,4 +609,14 @@ info(Config, Q, InfoKeys) ->
590
609
Config , Nodename ,
591
610
rabbit_classic_queue , info , [Amq , InfoKeys ]),
592
611
{ok , Info }.
612
+
613
+ get_state (Config , Q ) ->
614
+ Nodename = rabbit_ct_broker_helpers :get_node_config (Config , 0 , nodename ),
615
+ {ok , Amq } = rabbit_ct_broker_helpers :rpc (
616
+ Config , Nodename ,
617
+ rabbit_amqqueue , lookup , [rabbit_misc :r (<<" /" >>, queue , Q )]),
618
+ rabbit_ct_broker_helpers :rpc (
619
+ Config , Nodename ,
620
+ amqqueue , get_state , [Amq ]).
621
+
593
622
% %----------------------------------------------------------------------------
0 commit comments