aboutsummaryrefslogtreecommitdiffstats
path: root/lib/sasl
diff options
context:
space:
mode:
Diffstat (limited to 'lib/sasl')
-rw-r--r--lib/sasl/test/installer.erl20
-rw-r--r--lib/sasl/test/release_handler_SUITE.erl13
2 files changed, 27 insertions, 6 deletions
diff --git a/lib/sasl/test/installer.erl b/lib/sasl/test/installer.erl
index d77b0e8538..6942ec21ea 100644
--- a/lib/sasl/test/installer.erl
+++ b/lib/sasl/test/installer.erl
@@ -44,6 +44,7 @@
-export([upgrade_restart_1a/1]).
-export([upgrade_restart_2/1]).
-export([upgrade_restart_2a/1]).
+-export([upgrade_restart_2b/1]).
-export([upgrade_restart_3/1]).
-export([client1_1/4]).
-export([client2/3]).
@@ -403,7 +404,20 @@ upgrade_restart_2(TestNode) ->
?print(["upgrade_restart_2 start"]),
%% Check that the node has been restarted once more after the tmp release
+ case init:script_id() of
+ {"SASL-test","P2B"} ->
+ upgrade_restart_2a(TestNode);
+ {"SASL-test","__new_emulator__P1G"} ->
+ %% catched the node too early - give it another try
+ {wait,whereis(init)}
+ end.
+
+upgrade_restart_2a(TestNode) ->
+ ?print(["upgrade_restart_2a start"]),
+
+ %% This time we must be there, else something is definitely wrong
{"SASL-test","P2B"} = init:script_id(),
+
?check_release_states([permanent,current]),
?check_running_app(a,"1.1"),
@@ -412,11 +426,11 @@ upgrade_restart_2(TestNode) ->
ok.
-upgrade_restart_2a(TestNode) ->
- ?print(["upgrade_restart_2a start"]),
+upgrade_restart_2b(TestNode) ->
+ ?print(["upgrade_restart_2b start"]),
{ok,"P1G",[old_emu,rm_appl]} = release_handler:install_release("P1G"),
- ?print(["upgrade_restart_2a P1G installed"]),
+ ?print(["upgrade_restart_2b P1G installed"]),
ok.
upgrade_restart_3(TestNode) ->
diff --git a/lib/sasl/test/release_handler_SUITE.erl b/lib/sasl/test/release_handler_SUITE.erl
index c2930b1039..958f6bbfc9 100644
--- a/lib/sasl/test/release_handler_SUITE.erl
+++ b/lib/sasl/test/release_handler_SUITE.erl
@@ -375,11 +375,18 @@ upgrade_restart(Conf) when is_list(Conf) ->
wait_nodes_up([{TestNode,TestNodeInit1}],"upgrade_restart_1",[a]),
%% install P1G
+ case rpc_inst(TestNode, upgrade_restart_2, []) of
+ ok ->
+ ok;
+ {wait,TestNodeInit2a} ->
+ %% We catched the node too early - it was supposed to
+ %% restart twice, so let's wait for one more restart.
+ wait_nodes_up([{TestNode,TestNodeInit2a}],"upgrade_restart_2a",[])
+ end,
TestNodeInit2 = rpc:call(TestNode,erlang,whereis,[init]),
- ok = rpc_inst(TestNode, upgrade_restart_2, []),
stop_cover(TestNode),
- ok = rpc_inst(TestNode, upgrade_restart_2a, []),
- wait_nodes_up([{TestNode,TestNodeInit2}],"upgrade_restart_2",[]),
+ ok = rpc_inst(TestNode, upgrade_restart_2b, []),
+ wait_nodes_up([{TestNode,TestNodeInit2}],"upgrade_restart_2b",[]),
%% Check that P1G is going again
ok = rpc_inst(TestNode, upgrade_restart_3, []),