diff options
author | Siri Hansen <[email protected]> | 2012-07-02 17:56:24 +0200 |
---|---|---|
committer | Siri Hansen <[email protected]> | 2012-08-17 11:15:49 +0200 |
commit | b26f1ce4ba088efa7538122680f828b3f92f57d8 (patch) | |
tree | 822f516a7aa988eed91c745eea30e418187a9314 /lib/common_test/test/ct_netconfc_SUITE.erl | |
parent | cfff69a3a181f2092bc4a085ca677b1b5735bda7 (diff) | |
download | otp-b26f1ce4ba088efa7538122680f828b3f92f57d8.tar.gz otp-b26f1ce4ba088efa7538122680f828b3f92f57d8.tar.bz2 otp-b26f1ce4ba088efa7538122680f828b3f92f57d8.zip |
[common_test] Don't abort test run if connection process crashes
Earlier ct_util_server would terminate and thus abort the complete
test run if a connection process (ct_gen_conn) crashed. This is now
changed so that ct_util will only print an error report (in the test
case log) and continue the rest of the test.
Diffstat (limited to 'lib/common_test/test/ct_netconfc_SUITE.erl')
-rw-r--r-- | lib/common_test/test/ct_netconfc_SUITE.erl | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/lib/common_test/test/ct_netconfc_SUITE.erl b/lib/common_test/test/ct_netconfc_SUITE.erl index 8880d8b618..a7df38108f 100644 --- a/lib/common_test/test/ct_netconfc_SUITE.erl +++ b/lib/common_test/test/ct_netconfc_SUITE.erl @@ -106,6 +106,7 @@ all() -> receive_chunked_data, timeout_receive_chunked_data, close_while_waiting_for_chunked_data, + connection_crash, get_event_streams, create_subscription, receive_event] @@ -766,6 +767,18 @@ close_while_waiting_for_chunked_data(Config) -> {error,closed} = ct_netconfc:get(Client,{server,[{xmlns,"myns"}],[]},2000), ok. +connection_crash(Config) -> + DataDir = ?config(data_dir,Config), + {ok,Client} = open_success(DataDir), + + %% Test that if the test survives killing the connection + %% process. Earlier this caused ct_util_server to terminate, and + %% this aborting the complete test run. + spawn(fun() -> timer:sleep(500),exit(Client,kill) end), + ?NS:expect(get), + {error,{closed,killed}}=ct_netconfc:get(Client,{server,[{xmlns,"myns"}],[]}), + ok. + get_event_streams(Config) -> DataDir = ?config(data_dir,Config), {ok,Client} = open_success(DataDir), |