aboutsummaryrefslogtreecommitdiffstats
path: root/lib/mnesia/test/mnesia_recovery_test.erl
diff options
context:
space:
mode:
authorDan Gudmundsson <[email protected]>2015-03-11 15:59:37 +0100
committerDan Gudmundsson <[email protected]>2015-03-11 15:59:37 +0100
commita8cd2a465d6bc55b49f45be099213a5a06ee7f98 (patch)
tree812c1efbbdc66a7b8115cab49f4c7b80fe06a27e /lib/mnesia/test/mnesia_recovery_test.erl
parent1fe6b124f3ab9f69f043081edeee0cbce666f3f2 (diff)
parent47c44f3de3d5bf4251c35cf49474c3e29ad2933b (diff)
downloadotp-a8cd2a465d6bc55b49f45be099213a5a06ee7f98.tar.gz
otp-a8cd2a465d6bc55b49f45be099213a5a06ee7f98.tar.bz2
otp-a8cd2a465d6bc55b49f45be099213a5a06ee7f98.zip
Merge branch 'maint'
* maint: mnesia: Flush late messages Add Debug info mnesia: better debug info when tests fail mnesia: Ensure tables are loaded before testing them
Diffstat (limited to 'lib/mnesia/test/mnesia_recovery_test.erl')
-rw-r--r--lib/mnesia/test/mnesia_recovery_test.erl13
1 files changed, 10 insertions, 3 deletions
diff --git a/lib/mnesia/test/mnesia_recovery_test.erl b/lib/mnesia/test/mnesia_recovery_test.erl
index 0d0ad32fb0..946a9f97ba 100644
--- a/lib/mnesia/test/mnesia_recovery_test.erl
+++ b/lib/mnesia/test/mnesia_recovery_test.erl
@@ -320,7 +320,9 @@ read_during_down(Op, Config) when is_list(Config) ->
?log("W2R ~p~n", [W2R]),
loop_and_kill_mnesia(10, hd(W2R), Tabs),
[Pid ! self() || Pid <- Readers],
- ?match([ok, ok, ok], [receive ok -> ok after 1000 -> {Pid, mnesia_lib:dist_coredump()} end || Pid <- Readers]),
+ ?match([ok, ok, ok],
+ [receive ok -> ok after 5000 -> {Pid, mnesia_lib:dist_coredump()} end
+ || Pid <- Readers]),
?verify_mnesia(Ns, []).
reader(Tab, OP) ->
@@ -338,8 +340,12 @@ reader(Tab, OP) ->
?error("Expected ~p Got ~p ~n", [[{Tab, key, val}], Else]),
erlang:error(test_failed)
end,
- receive Pid ->
- Pid ! ok
+ receive
+ Pid when is_pid(Pid) ->
+ Pid ! ok;
+ Other ->
+ io:format("Msg: ~p~n", [Other]),
+ error(Other)
after 50 ->
reader(Tab, OP)
end.
@@ -1537,6 +1543,7 @@ disc_less(Config) when is_list(Config) ->
timer:sleep(500),
?match(ok, rpc:call(Node3, mnesia, start, [[{extra_db_nodes, [Node1, Node2]}]])),
?match(ok, rpc:call(Node3, mnesia, wait_for_tables, [[Tab1, Tab2, Tab3], 20000])),
+ ?match(ok, rpc:call(Node1, mnesia, wait_for_tables, [[Tab1, Tab2, Tab3], 20000])),
?match(ok, rpc:call(Node3, ?MODULE, verify_data, [Tab1, 100])),
?match(ok, rpc:call(Node3, ?MODULE, verify_data, [Tab2, 100])),