diff --git a/OpenICF-java-framework/connector-framework-server/src/test/java/org/forgerock/openicf/framework/local/AsyncLocalConnectorInfoManagerTest.java b/OpenICF-java-framework/connector-framework-server/src/test/java/org/forgerock/openicf/framework/local/AsyncLocalConnectorInfoManagerTest.java index ed115f43..03beb276 100644 --- a/OpenICF-java-framework/connector-framework-server/src/test/java/org/forgerock/openicf/framework/local/AsyncLocalConnectorInfoManagerTest.java +++ b/OpenICF-java-framework/connector-framework-server/src/test/java/org/forgerock/openicf/framework/local/AsyncLocalConnectorInfoManagerTest.java @@ -67,14 +67,14 @@ protected AsyncLocalConnectorInfoManager getConnectorInfoManager() throws Except @Test public void testAddConnectorBundle() throws Exception { ConnectorFrameworkFactory frameworkFactory = new ConnectorFrameworkFactory(); - final ReferenceCountedObject.Reference connectorFramework = + final ReferenceCountedObject.Reference connectorFramework2 = frameworkFactory.acquire(); Promise failedPromise; Promise failedRangePromise; try { - AsyncLocalConnectorInfoManager manager = connectorFramework.get().getLocalManager(); + AsyncLocalConnectorInfoManager manager = connectorFramework2.get().getLocalManager(); failedPromise = manager.findConnectorInfoAsync(new ConnectorKey("NOK", "NOK", "1.5.0.0")); @@ -117,7 +117,7 @@ public void handleException(RuntimeException error) { } }); } finally { - connectorFramework.release(); + connectorFramework2.release(); } Assert.assertNotNull(failedPromise); Assert.assertTrue(failedPromise.isDone()); @@ -146,12 +146,12 @@ public void handleResult(ConnectorInfo result) { @Test public void testConnectorBundleRange() throws Exception { - ConnectorFrameworkFactory frameworkFactory = getConnectorFrameworkFactory();//new ConnectorFrameworkFactory(); - final ReferenceCountedObject.Reference connectorFramework = + ConnectorFrameworkFactory frameworkFactory = new ConnectorFrameworkFactory(); + final ReferenceCountedObject.Reference connectorFramework2 = frameworkFactory.acquire(); try { - AsyncLocalConnectorInfoManager manager = connectorFramework.get().getLocalManager(); + AsyncLocalConnectorInfoManager manager = connectorFramework2.get().getLocalManager(); File testBundlesDir = getTestBundlesDir(); URL bundle10 = IOUtil.makeURL(testBundlesDir, "testbundlev10"); @@ -217,7 +217,7 @@ public void handleException(RuntimeException error) { }); } finally { - connectorFramework.release(); + connectorFramework2.release(); } }