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