diff options
author | Erlang/OTP <[email protected]> | 2011-11-10 14:55:10 +0100 |
---|---|---|
committer | Erlang/OTP <[email protected]> | 2011-11-10 14:55:10 +0100 |
commit | cfff1f4079a91b9e78aa8294186a1acae77d82d5 (patch) | |
tree | ddb0cb549e98f37d068fac65c1821bcac796f102 /lib/mnesia/test/mnesia_install_test.erl | |
parent | f561a98a9b89738467b52ab5213562de753f6ad2 (diff) | |
parent | 3879a583bf5a5889c2037b6410cd5ae58ff5e508 (diff) | |
download | otp-cfff1f4079a91b9e78aa8294186a1acae77d82d5.tar.gz otp-cfff1f4079a91b9e78aa8294186a1acae77d82d5.tar.bz2 otp-cfff1f4079a91b9e78aa8294186a1acae77d82d5.zip |
Merge branch 'dgud/mnesia/upgrade-cont/OTP-9657' into maint-r14
* dgud/mnesia/upgrade-cont/OTP-9657:
Prepare release
[mnesia] Fix deadlock in aborted mnesia:del_table_copy/2
[mnesia] Make all schema operations protocol aware
[mnesia] Remove export of clear_table which is not a schema operation anymore
[mnesia] Cleanly bring down mnesia
Diffstat (limited to 'lib/mnesia/test/mnesia_install_test.erl')
-rw-r--r-- | lib/mnesia/test/mnesia_install_test.erl | 23 |
1 files changed, 15 insertions, 8 deletions
diff --git a/lib/mnesia/test/mnesia_install_test.erl b/lib/mnesia/test/mnesia_install_test.erl index 5d55fcac0e..3a2d44aa95 100644 --- a/lib/mnesia/test/mnesia_install_test.erl +++ b/lib/mnesia/test/mnesia_install_test.erl @@ -205,7 +205,7 @@ silly_upgrade(Config) when is_list(Config) -> ?match(ok, mnesia:install_fallback(Bup2)), file:delete(Bup2), %% Will generate intentional crash, fatal error - ?match([], mnesia_test_lib:stop_mnesia([Node2])), + ?match([], mnesia_test_lib:stop_mnesia([Node2])), wait_till_dead([Node1, Node2]), ?match([], mnesia_test_lib:start_mnesia([Node1, Node2], [Tab1, Tab2])), ?match(match, verify_state(Tab1, Tab2, CpState)), @@ -213,22 +213,29 @@ silly_upgrade(Config) when is_list(Config) -> ?match(ok, mnesia:install_fallback(Bup)), file:delete(Bup), %% Will generate intentional crash, fatal error - ?match([], mnesia_test_lib:stop_mnesia([Node1, Node2])), + ?match([], mnesia_test_lib:stop_mnesia([Node1, Node2])), wait_till_dead([Node1, Node2]), ?match([], mnesia_test_lib:start_mnesia([Node1, Node2], [Tab1, Tab2])), CpState2 = [X || X <- CpState, element(1, X) /= Tab1], ?match(match, verify_state(Tab1, Tab2, CpState2)), ?verify_mnesia(Nodes, []). -wait_till_dead([]) -> ok; -wait_till_dead([N|Ns]) -> +wait_till_dead([]) -> + ok; %% timer:sleep(5); +wait_till_dead(Repeat = [N|Ns]) -> Apps = rpc:call(N, application, which_applications, []), case lists:keymember(mnesia, 1, Apps) of - true -> + true -> timer:sleep(10), - wait_till_dead([N|Ns]); - false -> - wait_till_dead(Ns) + wait_till_dead(Repeat); + false -> + case rpc:call(N, erlang, whereis, [mnesia_monitor]) of + undefined -> + wait_till_dead(Ns); + _ -> + timer:sleep(10), + wait_till_dead(Repeat) + end end. add_some_records(Tab1, Tab2, Old) -> |