aboutsummaryrefslogtreecommitdiffstats
path: root/lib/common_test/test/ct_netconfc_SUITE_data/netconfc1_SUITE.erl
diff options
context:
space:
mode:
authorSiri Hansen <[email protected]>2012-08-27 16:34:27 +0200
committerSiri Hansen <[email protected]>2012-08-27 16:39:03 +0200
commit440eb959f75e180b6cc660359581d84acc61136a (patch)
tree807290bbbfe01fc2c393a32ea7ffd106ee02230f /lib/common_test/test/ct_netconfc_SUITE_data/netconfc1_SUITE.erl
parent66573cb4ea59e0ff6251a598dab8a8aecfbedbd2 (diff)
downloadotp-440eb959f75e180b6cc660359581d84acc61136a.tar.gz
otp-440eb959f75e180b6cc660359581d84acc61136a.tar.bz2
otp-440eb959f75e180b6cc660359581d84acc61136a.zip
[common_test] Fix timing dependent bugs in test for ct_netconfc
Some of the tests failed every now and then because an ets table in the test netconf server was updated from different processes simultaneously. Also, the same entries were used for multiple netconf sessions. This has been corrected.
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.erl10
1 files changed, 6 insertions, 4 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 79768a9a6a..d337158bce 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
@@ -107,7 +107,8 @@ all() ->
connection_crash,
get_event_streams,
create_subscription,
- receive_event]
+ receive_event
+ ]
end.
@@ -216,6 +217,7 @@ hello_required_exists(Config) ->
?NS:expect_do_reply('close-session',close,ok),
?ok = ct_netconfc:close_session(my_named_connection),
+ timer:sleep(500),
%% Then check that it can be used again after the first is closed
{ok,_Client2} = open_configured_success(my_named_connection,DataDir),
@@ -234,7 +236,7 @@ hello_global_pwd(Config) ->
hello_no_session_id(Config) ->
DataDir = ?config(data_dir,Config),
?NS:hello(no_session_id),
- ?NS:expect(hello),
+ ?NS:expect(no_session_id,hello),
{error,{incorrect_hello,no_session_id_found}} = open(DataDir),
ok.
@@ -261,7 +263,7 @@ hello_no_caps(Config) ->
no_server_hello(Config) ->
DataDir = ?config(data_dir,Config),
- ?NS:expect(hello),
+ ?NS:expect(undefined,hello),
{error,{hello_session_failed,timeout}} = open(DataDir,[{timeout,2000}]),
ok.
@@ -435,7 +437,7 @@ kill_session(Config) ->
{ok,Client} = open_success(DataDir),
?NS:hello(2),
- ?NS:expect(hello),
+ ?NS:expect(2,hello),
{ok,_OtherClient} = open(DataDir),
?NS:expect_do_reply('kill-session',{kill,2},ok),