Cleanup test environment after tests.

git-svn-id: https://svn.apache.org/repos/asf/felix/trunk@1006293 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/ipojo/tests/core/external-handlers/src/main/java/org/apache/felix/ipojo/test/scenarios/eh/AutoHandlerTest.java b/ipojo/tests/core/external-handlers/src/main/java/org/apache/felix/ipojo/test/scenarios/eh/AutoHandlerTest.java
index 48a3ec9..4445cb8 100644
--- a/ipojo/tests/core/external-handlers/src/main/java/org/apache/felix/ipojo/test/scenarios/eh/AutoHandlerTest.java
+++ b/ipojo/tests/core/external-handlers/src/main/java/org/apache/felix/ipojo/test/scenarios/eh/AutoHandlerTest.java
@@ -38,7 +38,7 @@
 

 	public void setUp() {

 		factory = (ComponentFactory) Utils.getFactoryByName(getContext(), "HANDLER-HandlerTesterWO");

-		System.clearProperty(ORG_APACHE_FELIX_IPOJO_HANDLER_AUTO_PRIMITIVE);

+		System.setProperty(ORG_APACHE_FELIX_IPOJO_HANDLER_AUTO_PRIMITIVE, "");

 	}

 

 	public void tearDown() {

@@ -47,10 +47,17 @@
 		}

 		instance = null;

 

-		System.clearProperty(ORG_APACHE_FELIX_IPOJO_HANDLER_AUTO_PRIMITIVE);

+		System.setProperty(ORG_APACHE_FELIX_IPOJO_HANDLER_AUTO_PRIMITIVE, "");

+

 	}

 

 	public void testRequiredHandlerList() {

+		System.setProperty(ORG_APACHE_FELIX_IPOJO_HANDLER_AUTO_PRIMITIVE, "");

+

+		factory.stop();

+		factory.restart();

+		factory.start();

+

 		List list = factory.getRequiredHandlers();

 		assertFalse(list.contains("org.apache.felix.ipojo.test.handler.checkservice:check"));

 

@@ -64,6 +71,8 @@
 		list = factory.getRequiredHandlers();

 		assertTrue(list.contains("org.apache.felix.ipojo.test.handler.checkservice:check"));

 

+		System.setProperty(ORG_APACHE_FELIX_IPOJO_HANDLER_AUTO_PRIMITIVE, "");

+

 	}

 

 	public void testInstanceCreation() throws Exception {

@@ -81,5 +90,10 @@
 		assertNotNull(hd);

 		assertTrue(hd instanceof CheckServiceHandlerDescription);

 

+		System.setProperty(ORG_APACHE_FELIX_IPOJO_HANDLER_AUTO_PRIMITIVE, "");

+

+		factory.stop();

+		factory.restart();

+		factory.start();

 	}

 }