From 8e4b29f081a604fb4b55ddfcadb7476b6d0b1e1b Mon Sep 17 00:00:00 2001 From: Siri Hansen Date: Thu, 27 Mar 2014 15:31:41 +0100 Subject: Improve printout of command when encoding is utf-8 In release_handler_SUITE, print command with ~ts instead of ~tp in case it contains unicode characters. --- lib/sasl/test/release_handler_SUITE.erl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/sasl') diff --git a/lib/sasl/test/release_handler_SUITE.erl b/lib/sasl/test/release_handler_SUITE.erl index ad2a8005b9..2d108a6cad 100644 --- a/lib/sasl/test/release_handler_SUITE.erl +++ b/lib/sasl/test/release_handler_SUITE.erl @@ -2563,7 +2563,7 @@ start_nodes(Conf,Snames,Tag) -> start_node_unix(Sname,NodeDir) -> Script = filename:join([NodeDir,"bin","start"]), - ?t:format("Starting ~p: ~tp~n", [Sname,Script]), + ?t:format("Starting ~p: ~ts~n", [Sname,Script]), case rh_test_lib:cmd(Script,[],[{"NODENAME",atom_to_list(Sname)}]) of ok -> {ok,node_name(Sname)}; -- cgit v1.2.3 From 8b7ed9a291692b1f4858ecdf9b2b340403ce2564 Mon Sep 17 00:00:00 2001 From: Siri Hansen Date: Thu, 27 Mar 2014 15:34:06 +0100 Subject: Add debug printouts in release_handler_SUITE:upgrade_gg --- lib/sasl/test/release_handler_SUITE.erl | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'lib/sasl') diff --git a/lib/sasl/test/release_handler_SUITE.erl b/lib/sasl/test/release_handler_SUITE.erl index 2d108a6cad..55a467a4d5 100644 --- a/lib/sasl/test/release_handler_SUITE.erl +++ b/lib/sasl/test/release_handler_SUITE.erl @@ -2417,9 +2417,28 @@ check_gg_info(Node,OtherAlive,OtherDead,Synced) -> ?t:format("~ncheck_gg_info failed for ~p: ~p~nwhen GGI was: ~p~n" "and GI was: ~p~n", [Node,E,GGI,GI]), + %% An attempt to find out if it is only a timing issue + %% that makes this fail every now and then: + try_again_check(Node,GGI,GI,1), ?t:fail("check_gg_info failed") end. +try_again_check(_Node,_GGI,_GI,6) -> + ok; +try_again_check(Node,GGI,GI,N) -> + timer:sleep(1000), + case {rpc:call(Node,global_group,info,[]), + rpc:call(Node,global,info,[])} of + {GGI,GI} -> + ?t:format("~nAfter one more sek, GGI and GI are still the same"), + try_again_check(Node,GGI,GI,N+1); + {NewGGI,NewGI} -> + ?t:format("~nAfter one more sek:~nNew GGI: ~p~nNew GI: ~p~n", + [NewGGI,NewGI]), + try_again_check(Node,NewGGI,NewGI,N+1) + end. + + do_check_gg_info(OtherAlive,OtherDead,Synced,GGI,GI) -> {_,gg1} = lists:keyfind(own_group_name,1,GGI), {_,synced} = lists:keyfind(state,1,GGI), -- cgit v1.2.3 From 10f7058251f6992db460c4378d465f43cd6b14a1 Mon Sep 17 00:00:00 2001 From: Siri Hansen Date: Wed, 2 Apr 2014 17:58:14 +0200 Subject: Stop nodes after test cases in release_handler_SUITE Test cases 'release_handler_which_releases' and 'upgrade_supervisor' did not terminate the nodes they started. This might be the cause of failing test cases further down the suite. This has been corrected. --- lib/sasl/test/release_handler_SUITE.erl | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'lib/sasl') diff --git a/lib/sasl/test/release_handler_SUITE.erl b/lib/sasl/test/release_handler_SUITE.erl index 55a467a4d5..1d8bf45289 100644 --- a/lib/sasl/test/release_handler_SUITE.erl +++ b/lib/sasl/test/release_handler_SUITE.erl @@ -667,6 +667,9 @@ release_handler_which_releases(Conf) -> ok. +release_handler_which_releases(cleanup,_Conf) -> + stop_node(node_name(release_handler_which_releases)). + %%----------------------------------------------------------------- %% Ticket: OTP-2740 %% Slogan: vsn not numeric doesn't work so good in release_handling @@ -1365,6 +1368,9 @@ upgrade_supervisor(Conf) when is_list(Conf) -> ok. +upgrade_supervisor(cleanup,_Condf) -> + stop_node(node_name(upgrade_supervisor)). + %% Check that if the supervisor fails, then the upgrade is rolled back %% and an ok error message is returned upgrade_supervisor_fail(Conf) when is_list(Conf) -> -- cgit v1.2.3