From 2b9fc76e39ac649b25fbedb727eae70d2d83b4c6 Mon Sep 17 00:00:00 2001 From: Damian Minkov Date: Wed, 7 Dec 2011 10:16:24 +0000 Subject: [PATCH] Fixes tests bundle stopping. --- lib/felix.unit.test.properties | 3 ++- .../slick/runner/SipCommunicatorSlickRunner.java | 13 ++++++++++++- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/lib/felix.unit.test.properties b/lib/felix.unit.test.properties index 4ff16860a..4757a0cb8 100644 --- a/lib/felix.unit.test.properties +++ b/lib/felix.unit.test.properties @@ -29,7 +29,8 @@ org.osgi.framework.system.packages.extra= \ sun.net.dns; \ sun.security.action; \ sun.security.pkcs11; \ - sun.reflect; + sun.reflect; \ + org.xbill.DNS; # diff --git a/test/net/java/sip/communicator/slick/runner/SipCommunicatorSlickRunner.java b/test/net/java/sip/communicator/slick/runner/SipCommunicatorSlickRunner.java index 089d0f93d..d523ab360 100644 --- a/test/net/java/sip/communicator/slick/runner/SipCommunicatorSlickRunner.java +++ b/test/net/java/sip/communicator/slick/runner/SipCommunicatorSlickRunner.java @@ -188,7 +188,18 @@ public void frameworkEvent(FrameworkEvent event){ //"felix.embedded.execution" property to true //we could therefore now System.exit() with a code //indicating whether or not all unit tests went wrong - System.exit(errCount > 0? -1: 0); + + // After updating to Felix 3.2.2, System.exit locks + // the tests and it never stop, so it has to be removed + // or in new thread. + new Thread(new Runnable() + { + public void run() + { + System.exit(errCount > 0? -1: 0); + } + }).start(); + } } });