@@ -27,6 +27,7 @@ groups() ->
27
27
{overflow_reject_publish_dlx , [], [reject ]},
28
28
dropwhile_fetchwhile ,
29
29
info_head_message_timestamp ,
30
+ unknown_info_key ,
30
31
matching ,
31
32
purge ,
32
33
requeue ,
@@ -397,6 +398,19 @@ info_head_message_timestamp1(_Config) ->
397
398
PQ :delete_and_terminate (a_whim , BQS6 ),
398
399
passed .
399
400
401
+ unknown_info_key (Config ) ->
402
+ {Conn , Ch } = rabbit_ct_client_helpers :open_connection_and_channel (Config , 0 ),
403
+ Q = <<" info-priority-queue" >>,
404
+ declare (Ch , Q , 3 ),
405
+ publish (Ch , Q , [1 , 2 , 3 ]),
406
+
407
+ {ok , [{pid , _Pid }, {unknown_key , '' }]} = info (Config , Q , [pid , unknown_key ]),
408
+
409
+ delete (Ch , Q ),
410
+ rabbit_ct_client_helpers :close_channel (Ch ),
411
+ rabbit_ct_client_helpers :close_connection (Conn ),
412
+ passed .
413
+
400
414
ram_duration (_Config ) ->
401
415
QName = rabbit_misc :r (<<" /" >>, queue , <<" ram_duration-queue" >>),
402
416
Q0 = rabbit_amqqueue :pseudo_queue (QName , self ()),
@@ -518,4 +532,13 @@ queue_pid(Config, Nodename, Q) ->
518
532
[Pid ] = [P || [{name , Q1 }, {pid , P }] <- Info , Q =:= Q1 ],
519
533
Pid .
520
534
535
+ info (Config , Q , InfoKeys ) ->
536
+ Nodename = rabbit_ct_broker_helpers :get_node_config (Config , 0 , nodename ),
537
+ {ok , Amq } = rabbit_ct_broker_helpers :rpc (
538
+ Config , Nodename ,
539
+ rabbit_amqqueue , lookup , [rabbit_misc :r (<<" /" >>, queue , Q )]),
540
+ Info = rabbit_ct_broker_helpers :rpc (
541
+ Config , Nodename ,
542
+ rabbit_classic_queue , info , [Amq , InfoKeys ]),
543
+ {ok , Info }.
521
544
% %----------------------------------------------------------------------------
0 commit comments