diff options
author | Dan Gudmundsson <[email protected]> | 2014-03-04 10:25:11 +0100 |
---|---|---|
committer | Dan Gudmundsson <[email protected]> | 2014-03-28 09:55:57 +0100 |
commit | 51becf1a05c950857424314bc7f29e97fbd6456e (patch) | |
tree | 65936ee1f0b359574b496f8ff281bee0fb8cad6c /lib/mnesia/test/mnesia_evil_coverage_test.erl | |
parent | faae15d89ac03fce87f0370b011ed71f85d83d8b (diff) | |
download | otp-51becf1a05c950857424314bc7f29e97fbd6456e.tar.gz otp-51becf1a05c950857424314bc7f29e97fbd6456e.tar.bz2 otp-51becf1a05c950857424314bc7f29e97fbd6456e.zip |
mnesia: test harder sync
Diffstat (limited to 'lib/mnesia/test/mnesia_evil_coverage_test.erl')
-rw-r--r-- | lib/mnesia/test/mnesia_evil_coverage_test.erl | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/lib/mnesia/test/mnesia_evil_coverage_test.erl b/lib/mnesia/test/mnesia_evil_coverage_test.erl index 91820238e5..2d1623b6ca 100644 --- a/lib/mnesia/test/mnesia_evil_coverage_test.erl +++ b/lib/mnesia/test/mnesia_evil_coverage_test.erl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 1996-2013. All Rights Reserved. +%% Copyright Ericsson AB 1996-2014. All Rights Reserved. %% %% The contents of this file are subject to the Erlang Public License, %% Version 1.1, (the "License"); you may not use this file except in @@ -671,13 +671,16 @@ add_copy_when_going_down(Config) -> ?acquire_nodes(2, Config ++ [{tc_timeout, timer:minutes(2)}]), ?match({atomic, ok}, mnesia:create_table(a, [{ram_copies, [Node1]}])), %% Grab a write lock + Tester = self(), WriteAndWait = fun() -> mnesia:write({a,1,1}), - receive continue -> ok + Tester ! {self(), got_lock}, + receive continue -> ok end end, - _Lock = spawn(fun() -> mnesia:transaction(WriteAndWait) end), - Tester = self(), + Locker = spawn(fun() -> mnesia:transaction(WriteAndWait) end), + receive {Locker, got_lock} -> ok end, + spawn_link(fun() -> Res = rpc:call(Node2, mnesia, add_table_copy, [a, Node2, ram_copies]), Tester ! {test, Res} |