diff options
| author | Matthias Radestock <matthias@lshift.net> | 2010-02-04 22:23:26 +0000 |
|---|---|---|
| committer | Matthias Radestock <matthias@lshift.net> | 2010-02-04 22:23:26 +0000 |
| commit | 9c4138f756c63a1f075c64a5f2c8240e1c27ff3c (patch) | |
| tree | 8ef31c40624f729f1e20f5c9878358276510dbbe /src | |
| parent | 2bc033ea10ff9846a7af45abe437482709b6d027 (diff) | |
| download | rabbitmq-server-git-9c4138f756c63a1f075c64a5f2c8240e1c27ff3c.tar.gz | |
add test for 'rabbitmqctl close_connection'
This provides at least *some* coverage. Testing what happens when a
connection is in the 'running' state is too hard.
Diffstat (limited to 'src')
| -rw-r--r-- | src/rabbit_tests.erl | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/rabbit_tests.erl b/src/rabbit_tests.erl index 833ccc2638..a236a8ba9f 100644 --- a/src/rabbit_tests.erl +++ b/src/rabbit_tests.erl @@ -711,11 +711,14 @@ test_server_status() -> [L || L = #listener{node = N} <- rabbit_networking:active_listeners(), N =:= node()], - {ok, C} = gen_tcp:connect(H, P, []), + {ok, _C} = gen_tcp:connect(H, P, []), timer:sleep(100), ok = info_action(list_connections, rabbit_networking:connection_info_keys(), false), - ok = gen_tcp:close(C), + %% close_connection + [ConnPid] = rabbit_networking:connections(), + ok = control_action(close_connection, [rabbit_misc:pid_to_string(ConnPid), + "go away"]), passed. |
