aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorKlas Johansson <[email protected]>2011-04-17 22:26:43 +0200
committerKlas Johansson <[email protected]>2011-04-17 22:26:43 +0200
commitbd38a126546376246f9a93a2943e70a3925df48f (patch)
treeea1f7762041c085baf3ea4a91928ec4419487a82 /lib
parent0e7c557a9909f531530ee4742eb04ce23f03e3d6 (diff)
downloadotp-bd38a126546376246f9a93a2943e70a3925df48f.tar.gz
otp-bd38a126546376246f9a93a2943e70a3925df48f.tar.bz2
otp-bd38a126546376246f9a93a2943e70a3925df48f.zip
Don't let eunit_surefire report back to eunit when stopping
When eunit is terminating, a stop message is sent to all listeners and eunit then waits for *one* result message but previously both eunit_tty and eunit_surefire sent a response on error. Don't send a result message from eunit_surefire; let eunit_tty take care of all result reporting, both positive and negative to avoid race conditions and inconsistencies.
Diffstat (limited to 'lib')
-rw-r--r--lib/eunit/src/eunit_surefire.erl14
1 files changed, 4 insertions, 10 deletions
diff --git a/lib/eunit/src/eunit_surefire.erl b/lib/eunit/src/eunit_surefire.erl
index f289cd724a..dfb08c90b2 100644
--- a/lib/eunit/src/eunit_surefire.erl
+++ b/lib/eunit/src/eunit_surefire.erl
@@ -100,16 +100,10 @@ terminate({ok, _Data}, St) ->
XmlDir = St#state.xmldir,
write_report(TestSuite, XmlDir),
ok;
-terminate({error, Reason}, _St) ->
- io:fwrite("Internal error: ~P.\n", [Reason, 25]),
- sync_end(error).
-
-sync_end(Result) ->
- receive
- {stop, Reference, ReplyTo} ->
- ReplyTo ! {result, Reference, Result},
- ok
- end.
+terminate({error, _Reason}, _St) ->
+ %% Don't report any errors here, since eunit_tty takes care of that.
+ %% Just terminate.
+ ok.
handle_begin(group, Data, St) ->
NewId = proplists:get_value(id, Data),