@@ -83,6 +83,7 @@ all_tests() -> [
83
83
multiple_invalid_connections_test ,
84
84
exchanges_test ,
85
85
queues_test ,
86
+ crashed_queues_test ,
86
87
quorum_queues_test ,
87
88
stream_queues_have_consumers_field ,
88
89
bindings_test ,
@@ -1078,6 +1079,36 @@ queues_test(Config) ->
1078
1079
http_delete (Config , " /queues/downvhost/bar" , {group , '2xx' }),
1079
1080
passed .
1080
1081
1082
+ crashed_queues_test (Config ) ->
1083
+ Node = rabbit_ct_broker_helpers :get_node_config (Config , 0 , nodename ),
1084
+ Q = # resource {virtual_host = <<" /" >>, kind = queue , name = <<" crashingqueue" >>},
1085
+
1086
+ QArgs = #{},
1087
+ http_put (Config , " /queues/%2F/crashingqueue" , QArgs , {group , '2xx' }),
1088
+
1089
+ ok = rabbit_ct_broker_helpers :rpc (Config , 0 ,
1090
+ rabbit_amqqueue_control , await_state , [Node , Q , running ]),
1091
+
1092
+ ok = rabbit_ct_broker_helpers :rpc (Config , 0 ,
1093
+ rabbit_amqqueue , kill_queue_hard , [Node , Q ]),
1094
+
1095
+ ok = rabbit_ct_broker_helpers :rpc (Config , 0 ,
1096
+ rabbit_amqqueue_control , await_state , [Node , Q , crashed ]),
1097
+
1098
+ CrashedQueue = http_get (Config , " /queues/%2F/crashingqueue" ),
1099
+
1100
+ assert_item (#{name => <<" crashingqueue" >>,
1101
+ vhost => <<" /" >>,
1102
+ state => <<" crashed" >>,
1103
+ durable => false ,
1104
+ auto_delete => false ,
1105
+ exclusive => false ,
1106
+ arguments => #{}}, CrashedQueue ),
1107
+
1108
+ http_delete (Config , " /queues/%2F/crashingqueue" , {group , '2xx' }),
1109
+ http_delete (Config , " /queues/%2F/crashingqueue" , ? NOT_FOUND ),
1110
+ passed .
1111
+
1081
1112
quorum_queues_test (Config ) ->
1082
1113
% % Test in a loop that no metrics are left behing after deleting a queue
1083
1114
quorum_queues_test_loop (Config , 5 ).
0 commit comments