@@ -75,6 +75,7 @@ groups() ->
7575 unbind_bad_binding_path_segment ,
7676 exclusive_queue ,
7777 purge_stream ,
78+ purge_non_existing_queue_should_return_not_found ,
7879 pipeline ,
7980 multiple_link_pairs ,
8081 link_attach_order ,
@@ -773,6 +774,18 @@ purge_stream(Config) ->
773774 {ok , #{}} = rabbitmq_amqp_client :delete_queue (LinkPair , QName ),
774775 ok = cleanup (Init ).
775776
777+ purge_non_existing_queue_should_return_not_found (Config ) ->
778+ Init = {_ , LinkPair } = init (Config ),
779+ QName = atom_to_binary (? FUNCTION_NAME ),
780+
781+ {error , Resp } = rabbitmq_amqp_client :purge_queue (LinkPair , QName ),
782+ ? assertMatch (#{subject := <<" 404" >>}, amqp10_msg :properties (Resp )),
783+ # 'v1_0.amqp_value' {content = {utf8 , Reason }} = amqp10_msg :body (Resp ),
784+ ? assertEqual (<<" no queue '" , QName /binary , " ' in vhost '/'" >>,
785+ Reason ),
786+
787+ ok = cleanup (Init ).
788+
776789queue_topology (Config ) ->
777790 NodeNames = rabbit_ct_broker_helpers :get_node_configs (Config , nodename ),
778791 Nodes = [N0 , N1 , N2 ] = lists :map (fun erlang :atom_to_binary /1 , NodeNames ),
0 commit comments