diff options
author | Dan Gudmundsson <[email protected]> | 2015-01-14 16:24:09 +0100 |
---|---|---|
committer | Dan Gudmundsson <[email protected]> | 2015-02-10 15:27:16 +0100 |
commit | cde9cccfa1c4c262cccfb87299689e11c9cc8677 (patch) | |
tree | ed7a349c9d2375d856e46fcc4037d5ba3a3f1648 /lib/mnesia | |
parent | 99086ccdade5f00319edd7becade51546e2b1f70 (diff) | |
download | otp-cde9cccfa1c4c262cccfb87299689e11c9cc8677.tar.gz otp-cde9cccfa1c4c262cccfb87299689e11c9cc8677.tar.bz2 otp-cde9cccfa1c4c262cccfb87299689e11c9cc8677.zip |
mnesia: better debug info when tests fail
Diffstat (limited to 'lib/mnesia')
-rw-r--r-- | lib/mnesia/test/mnesia_recovery_test.erl | 4 | ||||
-rw-r--r-- | lib/mnesia/test/mnesia_test_lib.hrl | 10 |
2 files changed, 9 insertions, 5 deletions
diff --git a/lib/mnesia/test/mnesia_recovery_test.erl b/lib/mnesia/test/mnesia_recovery_test.erl index 24c35a82c5..fe4526878c 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) -> diff --git a/lib/mnesia/test/mnesia_test_lib.hrl b/lib/mnesia/test/mnesia_test_lib.hrl index 94a195f01f..cd76377df6 100644 --- a/lib/mnesia/test/mnesia_test_lib.hrl +++ b/lib/mnesia/test/mnesia_test_lib.hrl @@ -66,12 +66,14 @@ ?verbose("ok, ~n Result as expected:~p~n",[_AR_2]), {success,_AR_2}; _AR_2 -> - ?error("Not Matching Actual result was:~n ~p~n", [_AR_2]), + ?error("Not Matching Actual result was:~n ~p~n ~p~n", + [_AR_2, erlang:get_stacktrace()]), {fail,_AR_2} end; - _:_AR_1 -> - ?error("Not Matching Actual result was:~n ~p~n", [_AR_1]), - {fail,_AR_1} + _T1_:_AR_1 -> + ?error("Not Matching Actual result was:~n ~p~n ~p~n", + [{_T1_,_AR_1}, erlang:get_stacktrace()]), + {fail,{_T1_,_AR_1}} end end()). |