aboutsummaryrefslogtreecommitdiffstats
path: root/lib/jinterface/test/jinterface_SUITE.erl
diff options
context:
space:
mode:
authorSiri Hansen <[email protected]>2013-03-05 09:58:06 +0100
committerSiri Hansen <[email protected]>2013-03-05 09:58:06 +0100
commitfc6ce3f254fb231d157a765e1720612d0611baa2 (patch)
tree35f7f4281f12c806c5226ef273987e633cf88acb /lib/jinterface/test/jinterface_SUITE.erl
parent35030ae2cd6a6a6af4986f9f1ae8a98d76f43863 (diff)
downloadotp-fc6ce3f254fb231d157a765e1720612d0611baa2.tar.gz
otp-fc6ce3f254fb231d157a765e1720612d0611baa2.tar.bz2
otp-fc6ce3f254fb231d157a765e1720612d0611baa2.zip
[jinterface] Kill process between tests to avoid consequential error
In some cases when a test case fails, the erl_link_server process (which is spawned by many test cases in jinterface_SUITE) does not terminate. This causes the next test case to fail with a badarg as it tries to register a new process with the same name. To avoid this, erl_link_server, if it exists, is now killed in end_per_testcase. Also, some compiler warnings are removed from jitu.erl.
Diffstat (limited to 'lib/jinterface/test/jinterface_SUITE.erl')
-rw-r--r--lib/jinterface/test/jinterface_SUITE.erl6
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/jinterface/test/jinterface_SUITE.erl b/lib/jinterface/test/jinterface_SUITE.erl
index 82bc878112..b438da12d0 100644
--- a/lib/jinterface/test/jinterface_SUITE.erl
+++ b/lib/jinterface/test/jinterface_SUITE.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2004-2011. All Rights Reserved.
+%% Copyright Ericsson AB 2004-2013. 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
@@ -184,6 +184,10 @@ init_per_testcase(_Case,Config) ->
[{watch_dog,Dog}|Config].
end_per_testcase(_Case,Config) ->
+ case whereis(erl_link_server) of
+ undefined -> ok;
+ Pid -> exit(Pid,kill)
+ end,
?t:timetrap_cancel(?config(watch_dog,Config)),
ok.