aboutsummaryrefslogtreecommitdiffstats
path: root/lib/sasl/test/installer.erl
diff options
context:
space:
mode:
authorSiri Hansen <[email protected]>2011-10-17 15:47:05 +0200
committerSiri Hansen <[email protected]>2011-11-17 16:47:29 +0100
commit1e344f34bf9f3fcc0a75b2980ab79e60d4cd71fc (patch)
tree721ee2c512fbf922316f6ea1d069f46dae38ec76 /lib/sasl/test/installer.erl
parentd221b34133a8da8d62bdc57ebb724f86d7cd2fc0 (diff)
downloadotp-1e344f34bf9f3fcc0a75b2980ab79e60d4cd71fc.tar.gz
otp-1e344f34bf9f3fcc0a75b2980ab79e60d4cd71fc.tar.bz2
otp-1e344f34bf9f3fcc0a75b2980ab79e60d4cd71fc.zip
Wait for two restarts in upgrade_restart test
This is an attempt to correct a failing test case. It the test fails on having restarted only once, we give it another try to see if the second restart will happen.
Diffstat (limited to 'lib/sasl/test/installer.erl')
-rw-r--r--lib/sasl/test/installer.erl20
1 files changed, 17 insertions, 3 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) ->