Skip to content

Commit

Permalink
Remove unnecessary test
Browse files Browse the repository at this point in the history
  • Loading branch information
MarcialRosales authored and lukebakken committed Sep 27, 2022
1 parent 22ac4b8 commit e38b3dc
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 37 deletions.
2 changes: 1 addition & 1 deletion deps/rabbitmq_amqp1_0/src/rabbit_amqp1_0_reader.erl
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ handle_other({bump_credit, Msg}, State) ->
handle_other(terminate_connection, State) ->
State;
handle_other({info, InfoItems, Pid}, State) ->
logger:info("Reader info: State: ~p pid ~p infoitems: ~p ", [State, Pid, InfoItems]),
%logger:info("Reader info: State: ~p pid ~p infoitems: ~p ", [State, Pid, InfoItems]),
Infos = lists:map(
fun(InfoItem) ->
{InfoItem, info_internal(InfoItem, State)}
Expand Down
40 changes: 4 additions & 36 deletions deps/rabbitmq_amqp1_0/test/command_SUITE.erl
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,8 @@ groups() ->
merge_defaults,
validate,
when_no_connections,
when_one_connection,
when_one_amqp091_connection
]}
when_one_connection
]}
].

init_per_suite(Config) ->
Expand Down Expand Up @@ -91,40 +90,9 @@ when_one_connection(_Config) ->
Opts = #{node => A, timeout => 2000, verbose => true},

[Connection,Sender] = open_amqp10_connection(_Config),

[ExpectedConnection] = 'Elixir.Enum':to_list(?COMMAND:run([], Opts)),
close_amqp10_connection(Connection, Sender).

when_one_amqp091_connection(_Config) ->
[A] = rabbit_ct_broker_helpers:get_node_configs(_Config, nodename),
Opts = #{node => A, timeout => 2000},

Connection = open_amqp091_client_connection(_Config),
println("amqp connection", Connection),
[ Listed ] = rabbitmqctl_list_connections(_Config, A),
println("listed connection:", Listed),
close_amqp091_client_connection(Connection).

rabbitmqctl_list_connections(Config, Node) ->
{ok, StdOut} = rabbit_ct_broker_helpers:rabbitmqctl(Config, Node,
["list_connections", "--no-table-headers"]),
[<<"Listing connections", _/binary>> | Rows] = re:split(StdOut, <<"\n">>, [trim]),
Rows.

open_amqp091_client_connection(_Config) ->
ConnName = <<"Custom Name">>,
Host = ?config(rmq_hostname, _Config),
Port = rabbit_ct_broker_helpers:get_node_config(_Config, 0, tcp_port_amqp),
AmqpParams = #amqp_params_network{port = Port,
host = Host,
virtual_host = <<"/">>
},

{ok, Connection} = amqp_connection:start(AmqpParams, ConnName),
Connection.

close_amqp091_client_connection(Connection) ->
?assertEqual(ok, amqp_connection:close(Connection)).
[_] = 'Elixir.Enum':to_list(?COMMAND:run([], Opts)),
close_amqp10_connection(Connection, Sender).

open_amqp10_connection(Config) ->
Host = ?config(rmq_hostname, Config),
Expand Down

0 comments on commit e38b3dc

Please sign in to comment.