diff options
author | Dan Gudmundsson <[email protected]> | 2014-03-28 10:05:23 +0100 |
---|---|---|
committer | Dan Gudmundsson <[email protected]> | 2014-03-28 10:05:23 +0100 |
commit | 95ffe7eb374f59ce3f289747212adf042c1cd703 (patch) | |
tree | 5752dddb7ff2d9eb4d914402b396f226c5c2d964 /lib/mnesia/test/mnesia_evil_coverage_test.erl | |
parent | 5b9ffc724e7c3ffe7c775b5113de059e2e25f755 (diff) | |
parent | 4f63cca949982e88d958e33e2e278b18da4de4b3 (diff) | |
download | otp-95ffe7eb374f59ce3f289747212adf042c1cd703.tar.gz otp-95ffe7eb374f59ce3f289747212adf042c1cd703.tar.bz2 otp-95ffe7eb374f59ce3f289747212adf042c1cd703.zip |
Merge branch 'dgud/testcasecuddling'
* dgud/testcasecuddling:
os_mon: test tweaks
kernel: tweak tests
mnesia: test harder sync
mnesia: Dialyzer fixes
stdlib: loosen testcases
wx: loosen testcase
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} |