aboutsummaryrefslogtreecommitdiffstats
path: root/lib/tools/test/cover_SUITE_data/f.erl
diff options
context:
space:
mode:
authorSiri Hansen <[email protected]>2012-10-29 17:37:29 +0100
committerSiri Hansen <[email protected]>2012-10-30 11:19:25 +0100
commit0dbae9d6fcdaa9b699e85a00fe44560b89cc24df (patch)
tree49f77cb337627fad4a9aef3511e5ed66ca9629ed /lib/tools/test/cover_SUITE_data/f.erl
parentf0010583fd53174b72341d64be3a481cccc4623c (diff)
downloadotp-0dbae9d6fcdaa9b699e85a00fe44560b89cc24df.tar.gz
otp-0dbae9d6fcdaa9b699e85a00fe44560b89cc24df.tar.bz2
otp-0dbae9d6fcdaa9b699e85a00fe44560b89cc24df.zip
[cover] Allow reconnection if node has been disconnected or down
OTP-10523 Earlier, if the connection to a remote cover node was lost, all cover data was lost and the cover_server on the remote node would die. This would cause problems if there were cover compiled modules that would still be executed since they would attempt to write to the no longer existing ets tables belonging to the cover_server. This commit changes this behavior so that the cover_server on the remote node will survive connection loss and continue collecting cover data. If the connection is re-established then the main node will sync with the remote node again and cover data will not be lost (unless the node was down).
Diffstat (limited to 'lib/tools/test/cover_SUITE_data/f.erl')
-rw-r--r--lib/tools/test/cover_SUITE_data/f.erl11
1 files changed, 10 insertions, 1 deletions
diff --git a/lib/tools/test/cover_SUITE_data/f.erl b/lib/tools/test/cover_SUITE_data/f.erl
index 1ef8bbdb49..ce2963014a 100644
--- a/lib/tools/test/cover_SUITE_data/f.erl
+++ b/lib/tools/test/cover_SUITE_data/f.erl
@@ -1,5 +1,5 @@
-module(f).
--export([f1/0,f2/0]).
+-export([f1/0,f2/0,call_f2_when_isolated/0]).
f1() ->
f1_line1,
@@ -8,3 +8,12 @@ f1() ->
f2() ->
f2_line1,
f2_line2.
+
+call_f2_when_isolated() ->
+ case nodes() of
+ [] ->
+ f2();
+ _ ->
+ timer:sleep(100),
+ call_f2_when_isolated()
+ end.