Skip to content

Commit ff69b19

Browse files
committed
amqp_client_SUITE: Trim "list_connections" output before parsing it
[Why] Sometimes, at least in CI, it looks like the output of the CLI is prepended with a newline, sometimes not. This breaks the check of that output. [How] We just trim the output before parsing it. The parsing already takes care of trimming internal whitespaces.
1 parent 37f0ead commit ff69b19

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

deps/rabbit/test/amqp_client_SUITE.erl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4087,7 +4087,7 @@ list_connections(Config) ->
40874087

40884088
%% CLI should list AMQP 1.0 container-id
40894089
{ok, StdOut1} = rabbit_ct_broker_helpers:rabbitmqctl(Config, 0, ["list_connections", "--silent", "container_id"]),
4090-
ContainerIds0 = re:split(StdOut1, <<"\n">>, [trim]),
4090+
ContainerIds0 = re:split(string:trim(StdOut1), <<"\n">>, [trim]),
40914091
ContainerIds = lists:sort(ContainerIds0),
40924092
?assertEqual([<<>>, ContainerId0, ContainerId2],
40934093
ContainerIds),

0 commit comments

Comments
 (0)