From f5b70f15a18045d93b48f193378611b64db8688b Mon Sep 17 00:00:00 2001
From: matthew_swift <matthew_swift@localhost>
Date: Tue, 10 Jul 2007 11:18:56 +0000
Subject: [PATCH] Close the temporary server port before attempting to re-use it in newly created connection handlers. I'm not sure how this ever worked in the past, but it suddenly stopped working for me yesterday.

---
 opends/tests/unit-tests-testng/src/server/org/opends/server/protocols/ldap/LdapTestCase.java |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/opends/tests/unit-tests-testng/src/server/org/opends/server/protocols/ldap/LdapTestCase.java b/opends/tests/unit-tests-testng/src/server/org/opends/server/protocols/ldap/LdapTestCase.java
index 2644fc5..7cb4e91 100644
--- a/opends/tests/unit-tests-testng/src/server/org/opends/server/protocols/ldap/LdapTestCase.java
+++ b/opends/tests/unit-tests-testng/src/server/org/opends/server/protocols/ldap/LdapTestCase.java
@@ -164,6 +164,7 @@
 	  serverLdapSocket.setReuseAddress(true);
 	  serverLdapSocket.bind(new InetSocketAddress(localHost, 0));
 	  long serverLdapPort = serverLdapSocket.getLocalPort();
+    serverLdapSocket.close();
 	  Attribute a=new Attribute(ATTR_LISTEN_PORT, String.valueOf(serverLdapPort));
 	  handlerEntry.addAttribute(a,null);
     LDAPConnectionHandlerCfg config =

--
Gitblit v1.10.0