From 47cdb0899302e61dfe4ea392a10e4cc995183332 Mon Sep 17 00:00:00 2001 From: Siri Hansen Date: Wed, 30 Mar 2016 11:13:38 +0200 Subject: Improve error control when starting ssh in netconf test --- .../test/ct_netconfc_SUITE_data/netconfc1_SUITE.erl | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'lib/common_test/test/ct_netconfc_SUITE_data/netconfc1_SUITE.erl') diff --git a/lib/common_test/test/ct_netconfc_SUITE_data/netconfc1_SUITE.erl b/lib/common_test/test/ct_netconfc_SUITE_data/netconfc1_SUITE.erl index 9d4c798795..f23fb9154a 100644 --- a/lib/common_test/test/ct_netconfc_SUITE_data/netconfc1_SUITE.erl +++ b/lib/common_test/test/ct_netconfc_SUITE_data/netconfc1_SUITE.erl @@ -124,14 +124,18 @@ end_per_testcase(_Case, _Config) -> ok. init_per_suite(Config) -> - case catch {crypto:start(), ssh:start()} of - {ok, ok} -> + case catch ssh:start() of + Ok when Ok==ok; Ok=={error,{already_started,ssh}} -> + ct:log("ssh started",[]), {ok, _} = netconfc_test_lib:get_id_keys(Config), netconfc_test_lib:make_dsa_files(Config), + ct:log("dsa files created",[]), Server = ?NS:start(?config(data_dir,Config)), + ct:log("netconf server started",[]), [{server,Server}|Config]; - _ -> - {skip, "Crypto and/or SSH could not be started!"} + Other -> + ct:log("could not start ssh: ~p",[Other]), + {skip, "SSH could not be started!"} end. end_per_suite(Config) -> -- cgit v1.2.3 From b0527bc2540bf6d9179a243670f1d72b204131b8 Mon Sep 17 00:00:00 2001 From: Siri Hansen Date: Wed, 30 Mar 2016 16:16:37 +0200 Subject: Set longer timetrap when creating dsa files ... in test for ct_netconfc. --- lib/common_test/test/ct_netconfc_SUITE_data/netconfc1_SUITE.erl | 2 ++ 1 file changed, 2 insertions(+) (limited to 'lib/common_test/test/ct_netconfc_SUITE_data/netconfc1_SUITE.erl') diff --git a/lib/common_test/test/ct_netconfc_SUITE_data/netconfc1_SUITE.erl b/lib/common_test/test/ct_netconfc_SUITE_data/netconfc1_SUITE.erl index f23fb9154a..3a9443ee8c 100644 --- a/lib/common_test/test/ct_netconfc_SUITE_data/netconfc1_SUITE.erl +++ b/lib/common_test/test/ct_netconfc_SUITE_data/netconfc1_SUITE.erl @@ -123,6 +123,8 @@ init_per_testcase(_Case, Config) -> end_per_testcase(_Case, _Config) -> ok. +init_per_suite() -> + [{timetrap,2*?default_timeout}]. % making dsa files can be slow init_per_suite(Config) -> case catch ssh:start() of Ok when Ok==ok; Ok=={error,{already_started,ssh}} -> -- cgit v1.2.3 From 2a96db84ea2de90127cc1e841634ecb8adc57f14 Mon Sep 17 00:00:00 2001 From: Siri Hansen Date: Wed, 13 Apr 2016 11:58:55 +0200 Subject: Extend timer in test ct_netconfc_SUITE -> netconfc1_SUITE:close_while_waiting_for_chunked_data fails every now and then with {error,timeout} instead of {error,closed}. To overcome this, the timeout value in the failing call is now extended. --- lib/common_test/test/ct_netconfc_SUITE_data/netconfc1_SUITE.erl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/common_test/test/ct_netconfc_SUITE_data/netconfc1_SUITE.erl') diff --git a/lib/common_test/test/ct_netconfc_SUITE_data/netconfc1_SUITE.erl b/lib/common_test/test/ct_netconfc_SUITE_data/netconfc1_SUITE.erl index 3a9443ee8c..75633dad47 100644 --- a/lib/common_test/test/ct_netconfc_SUITE_data/netconfc1_SUITE.erl +++ b/lib/common_test/test/ct_netconfc_SUITE_data/netconfc1_SUITE.erl @@ -812,7 +812,7 @@ close_while_waiting_for_chunked_data(Config) -> %% Order server to expect a get - then the process above will make %% sure the rpc-reply is sent - but only a part of it - then close. ?NS:expect('get'), - {error,closed} = ct_netconfc:get(Client,{server,[{xmlns,"myns"}],[]},2000), + {error,closed} = ct_netconfc:get(Client,{server,[{xmlns,"myns"}],[]},4000), ok. connection_crash(Config) -> -- cgit v1.2.3