diff options
author | Siri Hansen <[email protected]> | 2015-09-28 15:37:41 +0200 |
---|---|---|
committer | Siri Hansen <[email protected]> | 2015-09-28 15:37:41 +0200 |
commit | 67b38c36eaa9b6d3edb80df75637f0e8cd1823f3 (patch) | |
tree | b1d7f7a01f70790b95444192c72e64350ae41874 /lib/common_test/test/ct_netconfc_SUITE_data/netconfc1_SUITE.erl | |
parent | 71501e4307e78805bda531c78352913d12e1dfc9 (diff) | |
download | otp-67b38c36eaa9b6d3edb80df75637f0e8cd1823f3.tar.gz otp-67b38c36eaa9b6d3edb80df75637f0e8cd1823f3.tar.bz2 otp-67b38c36eaa9b6d3edb80df75637f0e8cd1823f3.zip |
Speed up receive of many small packages
When data from the netconf server was split into many ssh packages,
the netconf client performed really bad. This is now improved.
Diffstat (limited to 'lib/common_test/test/ct_netconfc_SUITE_data/netconfc1_SUITE.erl')
-rw-r--r-- | lib/common_test/test/ct_netconfc_SUITE_data/netconfc1_SUITE.erl | 24 |
1 files changed, 18 insertions, 6 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 64ebfbc463..5f84634f74 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 @@ -36,7 +36,8 @@ -compile(export_all). suite() -> - [{ct_hooks, [{cth_conn_log, + [{timetrap,?default_timeout}, + {ct_hooks, [{cth_conn_log, [{ct_netconfc,[{log_type,html}, %will be overwritten by config {hosts,[my_named_connection,netconf1]}] }] @@ -72,6 +73,7 @@ all() -> invalid_opt, timeout_close_session, get, + get_a_lot, timeout_get, get_xpath, get_config, @@ -112,12 +114,9 @@ end_per_group(_GroupName, Config) -> init_per_testcase(_Case, Config) -> ets:delete_all_objects(ns_tab), - Dog = test_server:timetrap(?default_timeout), - [{watchdog, Dog}|Config]. + Config. -end_per_testcase(_Case, Config) -> - Dog=?config(watchdog, Config), - test_server:timetrap_cancel(Dog), +end_per_testcase(_Case, _Config) -> ok. init_per_suite(Config) -> @@ -351,6 +350,19 @@ get(Config) -> ?ok = ct_netconfc:close_session(Client), ok. +get_a_lot(Config) -> + DataDir = ?config(data_dir,Config), + {ok,Client} = open_success(DataDir), + Descr = lists:append(lists:duplicate(1000,"Description of myserver! ")), + Server = {server,[{xmlns,"myns"}],[{name,[],["myserver"]}, + {description,[],[Descr]}]}, + Data = lists:duplicate(100,Server), + ?NS:expect_reply('get',{fragmented,{data,Data}}), + {ok,Data} = ct_netconfc:get(Client,{server,[{xmlns,"myns"}],[]}), + ?NS:expect_do_reply('close-session',close,ok), + ?ok = ct_netconfc:close_session(Client), + ok. + timeout_get(Config) -> DataDir = ?config(data_dir,Config), {ok,Client} = open_success(DataDir), |