From 9f2bba679ab597f1e50078a29d145100e3baed3c Mon Sep 17 00:00:00 2001
From: Ludovic Poitou <ludovic.poitou@forgerock.com>
Date: Tue, 19 Oct 2010 16:36:12 +0000
Subject: [PATCH] Make ConnectionPool implementation fully async and fix some race conditions in the unit tests.

---
 sdk/tests/unit-tests-testng/src/org/opends/sdk/ConnectionFactoryTestCase.java |   28 +++++++++++++++++++++++++++-
 1 files changed, 27 insertions(+), 1 deletions(-)

diff --git a/sdk/tests/unit-tests-testng/src/org/opends/sdk/ConnectionFactoryTestCase.java b/sdk/tests/unit-tests-testng/src/org/opends/sdk/ConnectionFactoryTestCase.java
index e6195c8..e89e534 100644
--- a/sdk/tests/unit-tests-testng/src/org/opends/sdk/ConnectionFactoryTestCase.java
+++ b/sdk/tests/unit-tests-testng/src/org/opends/sdk/ConnectionFactoryTestCase.java
@@ -36,14 +36,18 @@
 import java.util.Arrays;
 import java.util.concurrent.CountDownLatch;
 import java.util.concurrent.TimeUnit;
+import java.util.logging.Level;
 
 import org.opends.sdk.requests.DigestMD5SASLBindRequest;
 import org.opends.sdk.requests.Requests;
 import org.opends.sdk.requests.SearchRequest;
+import org.testng.annotations.AfterClass;
 import org.testng.annotations.BeforeClass;
 import org.testng.annotations.Test;
 import org.testng.annotations.DataProvider;
 
+import com.sun.opends.sdk.util.StaticUtils;
+
 import javax.net.ssl.SSLContext;
 
 
@@ -101,8 +105,30 @@
 
 
 
+  /**
+   * Disables logging before the tests.
+   */
+  @BeforeClass()
+  public void disableLogging()
+  {
+    StaticUtils.DEBUG_LOG.setLevel(Level.SEVERE);
+  }
+
+
+
+  /**
+   * Re-enable logging after the tests.
+   */
+  @AfterClass()
+  public void enableLogging()
+  {
+    StaticUtils.DEBUG_LOG.setLevel(Level.INFO);
+  }
+
+
+
   @DataProvider(name = "connectionFactories")
-  public Object[][] getConnectyionFactories() throws Exception
+  public Object[][] getConnectionFactories() throws Exception
   {
     Object[][] factories = new Object[21][1];
 

--
Gitblit v1.10.0