aboutsummaryrefslogtreecommitdiffstats
path: root/lib/common_test/test/ct_netconfc_SUITE_data
diff options
context:
space:
mode:
authorSiri Hansen <[email protected]>2013-11-29 10:52:32 +0100
committerSiri Hansen <[email protected]>2013-11-29 10:52:32 +0100
commitd6b6c74de75357092649f31eb961154420461c15 (patch)
tree2eedadb94c9a9b5336a846127fbb65f5a7809390 /lib/common_test/test/ct_netconfc_SUITE_data
parent3b6f02df56823a122ca12ca84eda52c436f78e44 (diff)
parent5987cd070b80a0e14905359149af6baeacd3d310 (diff)
downloadotp-d6b6c74de75357092649f31eb961154420461c15.tar.gz
otp-d6b6c74de75357092649f31eb961154420461c15.tar.bz2
otp-d6b6c74de75357092649f31eb961154420461c15.zip
Merge branch 'siri/ct_netconfc/close_session-timeout-hangs/OTP-11478' into maint
* siri/ct_netconfc/close_session-timeout-hangs/OTP-11478: [common_test] Don't hang netconf client when close-session times out
Diffstat (limited to 'lib/common_test/test/ct_netconfc_SUITE_data')
-rw-r--r--lib/common_test/test/ct_netconfc_SUITE_data/netconfc1_SUITE.erl20
1 files changed, 20 insertions, 0 deletions
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 7acc05d5b2..2bcfeeec0c 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
@@ -84,7 +84,9 @@ all() ->
no_host,
no_port,
invalid_opt,
+ timeout_close_session,
get,
+ timeout_get,
get_xpath,
get_config,
get_config_xpath,
@@ -343,6 +345,15 @@ invalid_opt(Config) ->
{error,{invalid_option,{some_other_opt,true}}} = ct_netconfc:open(Opts2),
ok.
+timeout_close_session(Config) ->
+ DataDir = ?config(data_dir,Config),
+ {ok,Client} = open_success(DataDir),
+ ?NS:expect('close-session'),
+ true = erlang:is_process_alive(Client),
+ {error,timeout} = ct_netconfc:close_session(Client,1000),
+ false = erlang:is_process_alive(Client),
+ ok.
+
get(Config) ->
DataDir = ?config(data_dir,Config),
{ok,Client} = open_success(DataDir),
@@ -353,6 +364,15 @@ get(Config) ->
?ok = ct_netconfc:close_session(Client),
ok.
+timeout_get(Config) ->
+ DataDir = ?config(data_dir,Config),
+ {ok,Client} = open_success(DataDir),
+ ?NS:expect('get'),
+ {error,timeout} = ct_netconfc:get(Client,{server,[{xmlns,"myns"}],[]},1000),
+ ?NS:expect_do_reply('close-session',close,ok),
+ ?ok = ct_netconfc:close_session(Client),
+ ok.
+
get_xpath(Config) ->
DataDir = ?config(data_dir,Config),
{ok,Client} = open_success(DataDir),