Skip to content

Commit 7d8a281

Browse files
Merge pull request #14642 from rabbitmq/mk-amqp-client-ignore-expected-exceptions-in-node-logs
AMQP 0-9-1 client tests: ignore two expected exceptions in server node logs
2 parents 367d0b6 + 630da40 commit 7d8a281

File tree

1 file changed

+46
-8
lines changed

1 file changed

+46
-8
lines changed

deps/amqp_client/test/system_SUITE.erl

Lines changed: 46 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -140,9 +140,16 @@ create_unauthorized_user(Config) ->
140140
Cmd = ["add_user", ?UNAUTHORIZED_USER, ?UNAUTHORIZED_USER],
141141
case rabbit_ct_broker_helpers:rabbitmqctl(Config, 0, Cmd) of
142142
{ok, _} -> rabbit_ct_helpers:set_config(
143-
Config,
144-
[{rmq_unauthorized_username, ?UNAUTHORIZED_USER},
145-
{rmq_unauthorized_password, ?UNAUTHORIZED_USER}]);
143+
Config, [
144+
{rmq_unauthorized_username, ?UNAUTHORIZED_USER},
145+
{rmq_unauthorized_password, ?UNAUTHORIZED_USER},
146+
{ignored_crashes, [
147+
%% used in channel_death/1
148+
"bogus_message",
149+
%% used in channel_writer_death/1
150+
"badrecord"
151+
]}
152+
]);
146153
_ -> {skip, "Failed to create unauthorized user"}
147154
end.
148155

@@ -156,9 +163,25 @@ delete_unauthorized_user(Config) ->
156163
%% -------------------------------------------------------------------
157164

158165
init_per_group(direct_connection_tests, Config) ->
159-
rabbit_ct_helpers:set_config(Config, {amqp_client_conn_type, direct});
166+
rabbit_ct_helpers:set_config(Config, [
167+
{amqp_client_conn_type, direct},
168+
{ignored_crashes, [
169+
%% used in channel_death/1
170+
"bogus_message",
171+
%% used in channel_writer_death/1
172+
"badrecord"
173+
]}
174+
]);
160175
init_per_group(network_connection_tests, Config) ->
161-
rabbit_ct_helpers:set_config(Config, {amqp_client_conn_type, network});
176+
rabbit_ct_helpers:set_config(Config, [
177+
{amqp_client_conn_type, network},
178+
{ignored_crashes, [
179+
%% used in channel_death/1
180+
"bogus_message",
181+
%% used in channel_writer_death/1
182+
"badrecord"
183+
]}
184+
]);
162185
init_per_group(Group, Config)
163186
when Group =:= parallel_tests
164187
orelse Group =:= non_parallel_tests
@@ -167,7 +190,15 @@ init_per_group(Group, Config)
167190
orelse Group =:= hard_error_loop ->
168191
case ?config(amqp_client_conn_type, Config) of
169192
undefined -> rabbit_ct_helpers:set_config(
170-
Config, {amqp_client_conn_type, network});
193+
Config, [
194+
{amqp_client_conn_type, network},
195+
{ignored_crashes, [
196+
%% used in channel_death/1
197+
"bogus_message",
198+
%% used in channel_writer_death/1
199+
"badrecord"
200+
]}
201+
]);
171202
_ -> Config
172203
end.
173204

@@ -257,8 +288,15 @@ init_per_testcase(Test, Config) ->
257288
channel_max = ChannelMax,
258289
ssl_options = SSLOpts}
259290
end,
260-
rabbit_ct_helpers:set_config(Config,
261-
{amqp_client_conn_params, ConnParams}).
291+
rabbit_ct_helpers:set_config(Config, [
292+
{amqp_client_conn_params, ConnParams},
293+
{ignored_crashes, [
294+
%% used in channel_death/1
295+
"bogus_message",
296+
%% used in channel_writer_death/1
297+
"badrecord"
298+
]}
299+
]).
262300

263301
end_per_testcase(Test, Config) ->
264302
rabbit_ct_helpers:testcase_finished(Config, Test).

0 commit comments

Comments
 (0)