@@ -34,6 +34,7 @@ groups() ->
34
34
% % TODO at_most_once,
35
35
reject ,
36
36
redelivery ,
37
+ released ,
37
38
routing ,
38
39
invalid_routes ,
39
40
auth_failure ,
@@ -80,6 +81,13 @@ end_per_group(_, Config) ->
80
81
rabbit_ct_broker_helpers :teardown_steps ()).
81
82
82
83
init_per_testcase (Testcase , Config ) ->
84
+ enable_feature_flags (Config ,
85
+ [
86
+ message_containers_store_amqp_v1 ,
87
+ credit_api_v2 ,
88
+ quorum_queues_v4
89
+ % amqp_address_v1
90
+ ]),
83
91
rabbit_ct_helpers :testcase_started (Config , Testcase ).
84
92
85
93
end_per_testcase (Testcase , Config ) ->
@@ -115,22 +123,20 @@ build_maven_test_project(Config) ->
115
123
% % -------------------------------------------------------------------
116
124
117
125
roundtrip (Config ) ->
126
+ declare_queue (Config , ? FUNCTION_NAME , " quorum" ),
118
127
run (Config , [{dotnet , " roundtrip" },
119
128
{java , " RoundTripTest" }]).
120
129
121
130
streams (Config ) ->
122
- _ = rabbit_ct_broker_helpers :enable_feature_flag (Config ,
123
- message_containers_store_amqp_v1 ),
124
- Ch = rabbit_ct_client_helpers :open_channel (Config ),
125
- amqp_channel :call (Ch , # 'queue.declare' {queue = <<" stream_q2" >>,
126
- durable = true ,
127
- arguments = [{<<" x-queue-type" >>, longstr , " stream" }]}),
131
+ declare_queue (Config , ? FUNCTION_NAME , " stream" ),
128
132
run (Config , [{dotnet , " streams" }]).
129
133
130
134
roundtrip_to_amqp_091 (Config ) ->
135
+ declare_queue (Config , ? FUNCTION_NAME , " classic" ),
131
136
run (Config , [{dotnet , " roundtrip_to_amqp_091" }]).
132
137
133
138
default_outcome (Config ) ->
139
+ declare_queue (Config , ? FUNCTION_NAME , " classic" ),
134
140
run (Config , [{dotnet , " default_outcome" }]).
135
141
136
142
no_routes_is_released (Config ) ->
@@ -140,28 +146,41 @@ no_routes_is_released(Config) ->
140
146
run (Config , [{dotnet , " no_routes_is_released" }]).
141
147
142
148
outcomes (Config ) ->
149
+ declare_queue (Config , ? FUNCTION_NAME , " classic" ),
143
150
run (Config , [{dotnet , " outcomes" }]).
144
151
145
152
fragmentation (Config ) ->
153
+ declare_queue (Config , ? FUNCTION_NAME , " classic" ),
146
154
run (Config , [{dotnet , " fragmentation" }]).
147
155
148
156
message_annotations (Config ) ->
157
+ declare_queue (Config , ? FUNCTION_NAME , " classic" ),
149
158
run (Config , [{dotnet , " message_annotations" }]).
150
159
151
160
footer (Config ) ->
161
+ declare_queue (Config , ? FUNCTION_NAME , " classic" ),
152
162
run (Config , [{dotnet , " footer" }]).
153
163
154
164
data_types (Config ) ->
165
+ declare_queue (Config , ? FUNCTION_NAME , " classic" ),
155
166
run (Config , [{dotnet , " data_types" }]).
156
167
157
168
reject (Config ) ->
169
+ declare_queue (Config , ? FUNCTION_NAME , " classic" ),
158
170
run (Config , [{dotnet , " reject" }]).
159
171
160
172
redelivery (Config ) ->
173
+ declare_queue (Config , ? FUNCTION_NAME , " quorum" ),
161
174
run (Config , [{dotnet , " redelivery" }]).
162
175
176
+ released (Config ) ->
177
+ declare_queue (Config , ? FUNCTION_NAME , " quorum" ),
178
+ run (Config , [{dotnet , " released" }]).
179
+
163
180
routing (Config ) ->
164
181
Ch = rabbit_ct_client_helpers :open_channel (Config ),
182
+ amqp_channel :call (Ch , # 'queue.declare' {queue = <<" test" >>,
183
+ durable = true }),
165
184
amqp_channel :call (Ch , # 'queue.declare' {queue = <<" transient_q" >>,
166
185
durable = false }),
167
186
amqp_channel :call (Ch , # 'queue.declare' {queue = <<" durable_q" >>,
@@ -174,6 +193,18 @@ routing(Config) ->
174
193
arguments = [{<<" x-queue-type" >>, longstr , <<" stream" >>}]}),
175
194
amqp_channel :call (Ch , # 'queue.declare' {queue = <<" autodel_q" >>,
176
195
auto_delete = true }),
196
+ amqp_channel :call (Ch , # 'queue.declare' {queue = <<" fanout_q" >>,
197
+ durable = false }),
198
+ amqp_channel :call (Ch , # 'queue.bind' {queue = <<" fanout_q" >>,
199
+ exchange = <<" amq.fanout" >>
200
+ }),
201
+ amqp_channel :call (Ch , # 'queue.declare' {queue = <<" direct_q" >>,
202
+ durable = false }),
203
+ amqp_channel :call (Ch , # 'queue.bind' {queue = <<" direct_q" >>,
204
+ exchange = <<" amq.direct" >>,
205
+ routing_key = <<" direct_q" >>
206
+ }),
207
+
177
208
run (Config , [
178
209
{dotnet , " routing" }
179
210
]).
@@ -227,6 +258,7 @@ run_dotnet_test(Config, Method) ->
227
258
[
228
259
{cd , TestProjectDir }
229
260
]),
261
+ ct :pal (" ~s : result ~p " , [? FUNCTION_NAME , Ret ]),
230
262
{ok , _ } = Ret .
231
263
232
264
run_java_test (Config , Class ) ->
@@ -239,3 +271,23 @@ run_java_test(Config, Class) ->
239
271
],
240
272
[{cd , TestProjectDir }]),
241
273
{ok , _ } = Ret .
274
+
275
+
276
+ enable_feature_flags (Config , Flags ) ->
277
+ [begin
278
+ case rabbit_ct_broker_helpers :enable_feature_flag (Config , Flag ) of
279
+ ok -> ok ;
280
+ _ ->
281
+ throw ({skip , " feature flag ~s could not be enabled" })
282
+ end
283
+ end || Flag <- Flags ].
284
+
285
+ declare_queue (Config , Name , Type ) ->
286
+ Ch = rabbit_ct_client_helpers :open_channel (Config ),
287
+ # 'queue.declare_ok' {} =
288
+ amqp_channel :call (Ch , # 'queue.declare' {queue = atom_to_binary (Name , utf8 ),
289
+ durable = true ,
290
+ arguments = [{<<" x-queue-type" >>,
291
+ longstr , Type }]}),
292
+ rabbit_ct_client_helpers :close_channel (Ch ),
293
+ ok .
0 commit comments