direct tests run again bug24018
authorAlexandru Scvortov <alexandru@rabbitmq.com>
Thu, 28 Jul 2011 14:01:36 +0100
branchbug24018
changeset 12787b2ca497657f
parent 1277 576e15cca8c6
child 1279 130b30e40a06
direct tests run again

(and covertly strip trailing whitespace)
src/amqp_connection.erl
src/amqp_rpc_client.erl
src/amqp_rpc_server.erl
test/negative_test_util.erl
test/test_util.erl
     1.1 --- a/src/amqp_connection.erl	Thu Jul 28 13:46:07 2011 +0100
     1.2 +++ b/src/amqp_connection.erl	Thu Jul 28 14:01:36 2011 +0100
     1.3 @@ -82,7 +82,7 @@
     1.4  %% @type amqp_params_direct() = #amqp_params_direct{}.
     1.5  %% As defined in amqp_client.hrl. It contains the following fields:
     1.6  %% <ul>
     1.7 -%% <li>username :: binary() - The name of a user registered with the broker, 
     1.8 +%% <li>username :: binary() - The name of a user registered with the broker,
     1.9  %%     defaults to &lt;&lt;guest"&gt;&gt;</li>
    1.10  %% <li>virtual_host :: binary() - The name of a virtual host in the broker,
    1.11  %%     defaults to &lt;&lt;"/"&gt;&gt;</li>
    1.12 @@ -96,9 +96,9 @@
    1.13  %% @type amqp_params_network() = #amqp_params_network{}.
    1.14  %% As defined in amqp_client.hrl. It contains the following fields:
    1.15  %% <ul>
    1.16 -%% <li>username :: binary() - The name of a user registered with the broker, 
    1.17 +%% <li>username :: binary() - The name of a user registered with the broker,
    1.18  %%     defaults to &lt;&lt;guest"&gt;&gt;</li>
    1.19 -%% <li>password :: binary() - The user's password, defaults to 
    1.20 +%% <li>password :: binary() - The user's password, defaults to
    1.21  %%     &lt;&lt;"guest"&gt;&gt;</li>
    1.22  %% <li>virtual_host :: binary() - The name of a virtual host in the broker,
    1.23  %%     defaults to &lt;&lt;"/"&gt;&gt;</li>
    1.24 @@ -134,7 +134,6 @@
    1.25  %% the default ports will be selected depending on whether this is a
    1.26  %% normal or an SSL connection.
    1.27  start(AmqpParams) ->
    1.28 -    io:format("starting connection: ~p~n", [AmqpParams]),
    1.29      case amqp_client:start() of
    1.30          ok                                      -> ok;
    1.31          {error, {already_started, amqp_client}} -> ok;
    1.32 @@ -212,7 +211,7 @@
    1.33  %%      Text = binary()
    1.34  %% @doc Closes the AMQP connection, allowing the caller to set the reply
    1.35  %% code and text.
    1.36 -close(ConnectionPid, Code, Text) -> 
    1.37 +close(ConnectionPid, Code, Text) ->
    1.38      Close = #'connection.close'{reply_text =  Text,
    1.39                                  reply_code = Code,
    1.40                                  class_id   = 0,
     2.1 --- a/src/amqp_rpc_client.erl	Thu Jul 28 13:46:07 2011 +0100
     2.2 +++ b/src/amqp_rpc_client.erl	Thu Jul 28 14:01:36 2011 +0100
     2.3 @@ -14,10 +14,10 @@
     2.4  %% Copyright (c) 2007-2011 VMware, Inc.  All rights reserved.
     2.5  %%
     2.6  
     2.7 -%% @doc This module allows the simple execution of an asynchronous RPC over 
     2.8 +%% @doc This module allows the simple execution of an asynchronous RPC over
     2.9  %% AMQP. It frees a client programmer of the necessary having to AMQP
    2.10  %% plumbing. Note that the this module does not handle any data encoding,
    2.11 -%% so it is up to the caller to marshall and unmarshall message payloads 
    2.12 +%% so it is up to the caller to marshall and unmarshall message payloads
    2.13  %% accordingly.
    2.14  -module(amqp_rpc_client).
    2.15  
     3.1 --- a/src/amqp_rpc_server.erl	Thu Jul 28 13:46:07 2011 +0100
     3.2 +++ b/src/amqp_rpc_server.erl	Thu Jul 28 14:01:36 2011 +0100
     3.3 @@ -16,7 +16,7 @@
     3.4  
     3.5  %% @doc This is a utility module that is used to expose an arbitrary function
     3.6  %% via an asynchronous RPC over AMQP mechanism. It frees the implementor of
     3.7 -%% a simple function from having to plumb this into AMQP. Note that the 
     3.8 +%% a simple function from having to plumb this into AMQP. Note that the
     3.9  %% RPC server does not handle any data encoding, so it is up to the callback
    3.10  %% function to marshall and unmarshall message payloads accordingly.
    3.11  -module(amqp_rpc_server).
     4.1 --- a/test/negative_test_util.erl	Thu Jul 28 13:46:07 2011 +0100
     4.2 +++ b/test/negative_test_util.erl	Thu Jul 28 14:01:36 2011 +0100
     4.3 @@ -182,7 +182,8 @@
     4.4  
     4.5  invalid_password_test() ->
     4.6      Params = [{username, <<"guest">>}, {password, test_util:uuid()}],
     4.7 -    ?assertMatch({error, auth_failure}, test_util:new_connection(Params)).
     4.8 +    ?assertMatch({error, auth_failure},
     4.9 +                 test_util:new_connection(just_network, Params)).
    4.10  
    4.11  non_existent_vhost_test() ->
    4.12      Params = [{virtual_host, test_util:uuid()}],
     5.1 --- a/test/test_util.erl	Thu Jul 28 13:46:07 2011 +0100
     5.2 +++ b/test/test_util.erl	Thu Jul 28 14:01:36 2011 +0100
     5.3 @@ -826,7 +826,7 @@
     5.4                                    {verify, verify_peer},
     5.5                                    {fail_if_no_peer_cert, true}]}] ++ Params);
     5.6              {_, "direct"} ->
     5.7 -                make_direct_params([node, rabbit_misc:makenode(rabbit)] ++
     5.8 +                make_direct_params([{node, rabbit_misc:makenode(rabbit)}] ++
     5.9                                         Params)
    5.10          end,
    5.11      case amqp_connection:start(Params1) of