@@ -27,6 +27,7 @@ groups() ->
27
27
{overflow_reject_publish_dlx , [], [reject ]},
28
28
dropwhile_fetchwhile ,
29
29
info_head_message_timestamp ,
30
+ info_backing_queue_version ,
30
31
unknown_info_key ,
31
32
matching ,
32
33
purge ,
@@ -398,6 +399,27 @@ info_head_message_timestamp1(_Config) ->
398
399
PQ :delete_and_terminate (a_whim , BQS6 ),
399
400
passed .
400
401
402
+ info_backing_queue_version (Config ) ->
403
+ {Conn , Ch } = rabbit_ct_client_helpers :open_connection_and_channel (Config , 0 ),
404
+ Q1 = <<" info-priority-queue-v1" >>,
405
+ Q2 = <<" info-priority-queue-v2" >>,
406
+ declare (Ch , Q1 , [{<<" x-max-priority" >>, byte , 3 },
407
+ {<<" x-queue-version" >>, byte , 1 }]),
408
+ declare (Ch , Q2 , [{<<" x-max-priority" >>, byte , 3 },
409
+ {<<" x-queue-version" >>, byte , 2 }]),
410
+ try
411
+ {ok , [{backing_queue_status , BQS1 }]} = info (Config , Q1 , [backing_queue_status ]),
412
+ 1 = proplists :get_value (version , BQS1 ),
413
+ {ok , [{backing_queue_status , BQS2 }]} = info (Config , Q2 , [backing_queue_status ]),
414
+ 2 = proplists :get_value (version , BQS2 )
415
+ after
416
+ delete (Ch , Q1 ),
417
+ delete (Ch , Q2 ),
418
+ rabbit_ct_client_helpers :close_channel (Ch ),
419
+ rabbit_ct_client_helpers :close_connection (Conn ),
420
+ passed
421
+ end .
422
+
401
423
unknown_info_key (Config ) ->
402
424
{Conn , Ch } = rabbit_ct_client_helpers :open_connection_and_channel (Config , 0 ),
403
425
Q = <<" info-priority-queue" >>,
0 commit comments