Skip to content

Commit df8aa44

Browse files
michaelklishinmergify[bot]
authored andcommitted
Adapt #16293 to the v4.3.x branch with non-native STOMP
References #16294. (cherry picked from commit 6323a5d)
1 parent 1a5e24d commit df8aa44

2 files changed

Lines changed: 0 additions & 68 deletions

File tree

deps/rabbitmq_stomp/test/connections_SUITE.erl

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -91,11 +91,7 @@ direct_client_connections_are_not_leaked(Config) ->
9191
Client, "LOL", [{"", ""}])
9292
end,
9393
lists:seq(1, 100)),
94-
<<<<<<< HEAD
9594
?awaitMatch(N, count_connections(Config), 30_000),
96-
=======
97-
rabbit_ct_helpers:await_condition(fun() -> count_connections(Config) =:= N end, 30_000),
98-
>>>>>>> f364a7fce (Fix more test flakes (QQs, MQTT, STOMP, Stream Protocol))
9995
ok.
10096

10197
messages_not_dropped_on_disconnect(Config) ->

deps/rabbitmq_stomp/test/system_SUITE.erl

Lines changed: 0 additions & 64 deletions
Original file line numberDiff line numberDiff line change
@@ -118,70 +118,6 @@ end_per_testcase0(publish_unauthorized_error, Config) ->
118118
end_per_testcase0(_, Config) ->
119119
Config.
120120

121-
<<<<<<< HEAD
122-
=======
123-
transaction_limit(Config) ->
124-
Client = ?config(stomp_client, Config),
125-
%% Open 16 transactions (the limit)
126-
lists:foreach(fun(I) ->
127-
TxId = integer_to_binary(I),
128-
rabbit_stomp_client:send(Client, 'BEGIN',
129-
[{<<"transaction">>, TxId}])
130-
end, lists:seq(1, 16)),
131-
132-
%% The 17th should fail
133-
rabbit_stomp_client:send(Client, 'BEGIN',
134-
[{<<"transaction">>, <<"17">>}]),
135-
{ok, _Client1, Hdrs, _} = stomp_receive(Client, 'ERROR'),
136-
<<"Transaction limit exceeded">> = maps:get(<<"message">>, Hdrs),
137-
ok.
138-
139-
global_counters(Config) ->
140-
Version = ?config(version, Config),
141-
ProtoVer = stomp_proto_ver(Version),
142-
Dest = iolist_to_binary(["/topic/counter-test-", Version]),
143-
144-
C0 = get_global_counters(Config, ProtoVer),
145-
Pubs0 = maps:get(publishers, C0, 0),
146-
Cons0 = maps:get(consumers, C0, 0),
147-
Recv0 = maps:get(messages_received_total, C0, 0),
148-
Routed0 = maps:get(messages_routed_total, C0, 0),
149-
150-
Client = ?config(stomp_client, Config),
151-
rabbit_stomp_client:send(
152-
Client, 'SUBSCRIBE',
153-
[{<<"destination">>, Dest}, {<<"id">>, <<"counter-sub">>}]),
154-
155-
rabbit_stomp_client:send(
156-
Client, 'SEND', [{<<"destination">>, Dest}], ["hello"]),
157-
158-
{ok, Client1, _Hdrs, _Body} = stomp_receive(Client, 'MESSAGE'),
159-
160-
C1 = get_global_counters(Config, ProtoVer),
161-
?assertEqual(Pubs0 + 1, maps:get(publishers, C1)),
162-
?assertEqual(Cons0 + 1, maps:get(consumers, C1)),
163-
?assertEqual(Recv0 + 1, maps:get(messages_received_total, C1)),
164-
?assertEqual(Routed0 + 1, maps:get(messages_routed_total, C1)),
165-
166-
rabbit_stomp_client:send(
167-
Client1, 'UNSUBSCRIBE', [{<<"id">>, <<"counter-sub">>}]),
168-
169-
rabbit_ct_helpers:await_condition(
170-
fun() -> maps:get(consumers, get_global_counters(Config, ProtoVer)) =:= Cons0 end,
171-
5_000),
172-
173-
ok.
174-
175-
get_global_counters(Config, ProtoVer) ->
176-
maps:get(#{protocol => ProtoVer},
177-
rabbit_ct_broker_helpers:rpc(
178-
Config, 0, rabbit_global_counters, overview, [])).
179-
180-
stomp_proto_ver("1.0") -> 'STOMP 1.0';
181-
stomp_proto_ver("1.1") -> 'STOMP 1.1';
182-
stomp_proto_ver("1.2") -> 'STOMP 1.2'.
183-
184-
>>>>>>> f364a7fce (Fix more test flakes (QQs, MQTT, STOMP, Stream Protocol))
185121
publish_no_dest_error(Config) ->
186122
Client = ?config(stomp_client, Config),
187123
rabbit_stomp_client:send(

0 commit comments

Comments
 (0)