You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@directory.apache.org by se...@apache.org on 2018/12/24 09:47:51 UTC

[directory-server] 01/01: Remove inifinite timeout settings in tests

This is an automated email from the ASF dual-hosted git repository.

seelmann pushed a commit to branch remove-infinite-timeout
in repository https://gitbox.apache.org/repos/asf/directory-server.git

commit 2f415c5a58deca2611d005da879fc886bddb08aa
Author: Stefan Seelmann <ma...@stefan-seelmann.de>
AuthorDate: Mon Dec 24 10:47:30 2018 +0100

    Remove inifinite timeout settings in tests
---
 .../server/core/api/LdapCoreSessionConnectionTest.java |  1 -
 .../shared/client/api/LdapApiIntegrationUtils.java     |  1 -
 .../client/template/LdapConnectionTemplateTest.java    |  1 -
 .../client/api/LightweightLdapConnectionPoolTest.java  |  4 ----
 .../shared/client/api/ServerSchemaLoaderTest.java      |  1 -
 .../client/api/operations/ClientAddRequestTest.java    |  2 --
 .../api/operations/bind/SimpleBindRequestTest.java     |  1 -
 .../search/AnonymousClientSearchRequestTest.java       |  1 -
 .../api/operations/search/OperationWithIndexTest.java  |  1 -
 .../src/test/java/MultiThreadedReadWriteTest.java      |  1 -
 .../directory/server/operations/add/AddAliasIT.java    |  3 ---
 .../apache/directory/server/operations/add/AddIT.java  |  2 --
 .../add/AddingEntriesWithSpecialCharactersInRDNIT.java |  1 -
 .../server/operations/bind/DelegatedAuthIT.java        |  2 --
 .../server/operations/bind/DelegatedAuthOverSslIT.java |  1 -
 .../server/operations/bind/DelegatedAuthOverTlsIT.java |  1 -
 .../directory/server/operations/bind/SaslBindIT.java   |  3 ---
 .../directory/server/operations/bind/SimpleBindIT.java |  1 -
 .../server/operations/extended/PwdModifyIT.java        |  5 -----
 .../directory/server/operations/extended/WhoAmIIT.java |  2 --
 .../directory/server/operations/lookup/LookupIT.java   |  2 --
 .../server/operations/modify/ModifyAddIT.java          |  2 --
 .../server/operations/modifydn/ModifyRdnIT.java        |  2 --
 .../server/operations/search/SearchPerfIT.java         |  2 --
 .../server/operations/search/SortedSearchIT.java       |  1 -
 .../directory/server/ppolicy/PasswordPolicyIT.java     | 18 ------------------
 .../server/replication/MockSyncReplConsumer.java       |  1 -
 27 files changed, 63 deletions(-)

diff --git a/core-integ/src/test/java/org/apache/directory/server/core/api/LdapCoreSessionConnectionTest.java b/core-integ/src/test/java/org/apache/directory/server/core/api/LdapCoreSessionConnectionTest.java
index b22789c..f9b6d3d 100755
--- a/core-integ/src/test/java/org/apache/directory/server/core/api/LdapCoreSessionConnectionTest.java
+++ b/core-integ/src/test/java/org/apache/directory/server/core/api/LdapCoreSessionConnectionTest.java
@@ -109,7 +109,6 @@ public class LdapCoreSessionConnectionTest extends AbstractLdapTestUnit
         try
         {
             connection = new LdapNetworkConnection( Network.LOOPBACK_HOSTNAME, getLdapServer().getPort() );
-            connection.setTimeOut( 0L );
 
             BindRequest bindRequest = new BindRequestImpl();
             bindRequest.setDn( new Dn( "cn=user,ou=system" ) );
diff --git a/ldap-client-test/src/main/java/org/apache/directory/shared/client/api/LdapApiIntegrationUtils.java b/ldap-client-test/src/main/java/org/apache/directory/shared/client/api/LdapApiIntegrationUtils.java
index 14bdaef..9f41037 100644
--- a/ldap-client-test/src/main/java/org/apache/directory/shared/client/api/LdapApiIntegrationUtils.java
+++ b/ldap-client-test/src/main/java/org/apache/directory/shared/client/api/LdapApiIntegrationUtils.java
@@ -180,7 +180,6 @@ public final class LdapApiIntegrationUtils
     public static LdapConnection getAnonymousNetworkConnection( LdapServer ldapServer ) throws LdapException
     {
         LdapConnection connection = new LdapNetworkConnection( Network.LOOPBACK_HOSTNAME, ldapServer.getPort() );
-        connection.setTimeOut( 0L );
         connection.bind();
 
         return connection;
diff --git a/ldap-client-test/src/test/java/org/apache/directory/ldap/client/template/LdapConnectionTemplateTest.java b/ldap-client-test/src/test/java/org/apache/directory/ldap/client/template/LdapConnectionTemplateTest.java
index 4dbe05b..dab038e 100755
--- a/ldap-client-test/src/test/java/org/apache/directory/ldap/client/template/LdapConnectionTemplateTest.java
+++ b/ldap-client-test/src/test/java/org/apache/directory/ldap/client/template/LdapConnectionTemplateTest.java
@@ -369,7 +369,6 @@ public class LdapConnectionTemplateTest
         config.setCredentials( "secret" );
 
         DefaultLdapConnectionFactory factory = new DefaultLdapConnectionFactory( config );
-        factory.setTimeOut( 30000 );
 
         // optional, values below are defaults
         GenericObjectPoolConfig poolConfig = new GenericObjectPoolConfig();
diff --git a/ldap-client-test/src/test/java/org/apache/directory/shared/client/api/LightweightLdapConnectionPoolTest.java b/ldap-client-test/src/test/java/org/apache/directory/shared/client/api/LightweightLdapConnectionPoolTest.java
index dd05d29..bf84996 100644
--- a/ldap-client-test/src/test/java/org/apache/directory/shared/client/api/LightweightLdapConnectionPoolTest.java
+++ b/ldap-client-test/src/test/java/org/apache/directory/shared/client/api/LightweightLdapConnectionPoolTest.java
@@ -156,7 +156,6 @@ public class LightweightLdapConnectionPoolTest extends AbstractLdapTestUnit
             config.setLdapPort( 10389 );
             config.setName( DEFAULT_ADMIN );
             config.setCredentials( DEFAULT_PASSWORD );
-            config.setTimeout( 30000 );
 
             long t0 = System.currentTimeMillis();
 
@@ -214,7 +213,6 @@ public class LightweightLdapConnectionPoolTest extends AbstractLdapTestUnit
         config.setLdapPort( port );
         config.setName( DEFAULT_ADMIN );
         config.setCredentials( DEFAULT_PASSWORD );
-        config.setTimeout( 30000 );
         PooledObjectFactory<LdapConnection> factory = new DefaultPoolableLdapConnectionFactory( config );
         pool = new LdapConnectionPool( factory );
         pool.setTestOnBorrow( true );
@@ -247,7 +245,6 @@ public class LightweightLdapConnectionPoolTest extends AbstractLdapTestUnit
         config.setLdapPort( port );
         config.setName( DEFAULT_ADMIN );
         config.setCredentials( DEFAULT_PASSWORD );
-        config.setTimeout( 30000 );
         PooledObjectFactory<LdapConnection> factory = new DefaultPoolableLdapConnectionFactory( config );
         LdapConnectionPool poolNoIdle = new LdapConnectionPool( factory );
         poolNoIdle.setTestOnBorrow( true );
@@ -298,7 +295,6 @@ public class LightweightLdapConnectionPoolTest extends AbstractLdapTestUnit
         config.setLdapPort( port );
         config.setName( DEFAULT_ADMIN );
         config.setCredentials( DEFAULT_PASSWORD );
-        config.setTimeout( 30000 );
         PooledObjectFactory<LdapConnection> factory = new DefaultPoolableLdapConnectionFactory( config );
         LdapConnectionPool poolWithIdle = new LdapConnectionPool( factory );
         poolWithIdle.setTestOnBorrow( true );
diff --git a/ldap-client-test/src/test/java/org/apache/directory/shared/client/api/ServerSchemaLoaderTest.java b/ldap-client-test/src/test/java/org/apache/directory/shared/client/api/ServerSchemaLoaderTest.java
index 19098bc..de6a9b3 100644
--- a/ldap-client-test/src/test/java/org/apache/directory/shared/client/api/ServerSchemaLoaderTest.java
+++ b/ldap-client-test/src/test/java/org/apache/directory/shared/client/api/ServerSchemaLoaderTest.java
@@ -73,7 +73,6 @@ public class ServerSchemaLoaderTest extends AbstractLdapTestUnit
     @Test
     public void testLoadSSSE() throws Exception
     {
-        connection.setTimeOut( 0L );
         SchemaLoader loader = new DefaultSchemaLoader( connection );
 
         // Load the schemas
diff --git a/ldap-client-test/src/test/java/org/apache/directory/shared/client/api/operations/ClientAddRequestTest.java b/ldap-client-test/src/test/java/org/apache/directory/shared/client/api/operations/ClientAddRequestTest.java
index 9bc27a7..80c1c2b 100644
--- a/ldap-client-test/src/test/java/org/apache/directory/shared/client/api/operations/ClientAddRequestTest.java
+++ b/ldap-client-test/src/test/java/org/apache/directory/shared/client/api/operations/ClientAddRequestTest.java
@@ -375,7 +375,6 @@ public class ClientAddRequestTest extends AbstractLdapTestUnit
     @Test
     public void testPreserveRdnUpName() throws Exception
     {
-        connection.setTimeOut( 0L );
         Dn dn = new Dn( getService().getSchemaManager(), "cn=testadd,ou=system" );
         Entry entry = new DefaultEntry( dn,
             "ObjectClass: person",
@@ -397,7 +396,6 @@ public class ClientAddRequestTest extends AbstractLdapTestUnit
     @Test
     public void testAddNullValueSchemaAware() throws LdapException, IOException
     {
-        connection.setTimeOut( 0L );
         connection.loadSchema();
 
         // Use the client API
diff --git a/ldap-client-test/src/test/java/org/apache/directory/shared/client/api/operations/bind/SimpleBindRequestTest.java b/ldap-client-test/src/test/java/org/apache/directory/shared/client/api/operations/bind/SimpleBindRequestTest.java
index b6b7834..8f21459 100644
--- a/ldap-client-test/src/test/java/org/apache/directory/shared/client/api/operations/bind/SimpleBindRequestTest.java
+++ b/ldap-client-test/src/test/java/org/apache/directory/shared/client/api/operations/bind/SimpleBindRequestTest.java
@@ -106,7 +106,6 @@ public class SimpleBindRequestTest extends AbstractLdapTestUnit
     public void setup() throws Exception
     {
         connection = new LdapNetworkConnection( Network.LOOPBACK_HOSTNAME, getLdapServer().getPort() );
-        connection.setTimeOut( 0L );
     }
 
 
diff --git a/ldap-client-test/src/test/java/org/apache/directory/shared/client/api/operations/search/AnonymousClientSearchRequestTest.java b/ldap-client-test/src/test/java/org/apache/directory/shared/client/api/operations/search/AnonymousClientSearchRequestTest.java
index 1d8c4b0..de9867b 100644
--- a/ldap-client-test/src/test/java/org/apache/directory/shared/client/api/operations/search/AnonymousClientSearchRequestTest.java
+++ b/ldap-client-test/src/test/java/org/apache/directory/shared/client/api/operations/search/AnonymousClientSearchRequestTest.java
@@ -98,7 +98,6 @@ public class AnonymousClientSearchRequestTest extends AbstractLdapTestUnit
     public void setup() throws Exception
     {
         connection = ( LdapNetworkConnection ) LdapApiIntegrationUtils.getAnonymousNetworkConnection( getLdapServer() );
-        connection.setTimeOut( 0L );
     }
     
     
diff --git a/ldap-client-test/src/test/java/org/apache/directory/shared/client/api/operations/search/OperationWithIndexTest.java b/ldap-client-test/src/test/java/org/apache/directory/shared/client/api/operations/search/OperationWithIndexTest.java
index 9f65a5d..13d338f 100644
--- a/ldap-client-test/src/test/java/org/apache/directory/shared/client/api/operations/search/OperationWithIndexTest.java
+++ b/ldap-client-test/src/test/java/org/apache/directory/shared/client/api/operations/search/OperationWithIndexTest.java
@@ -117,7 +117,6 @@ public class OperationWithIndexTest extends AbstractLdapTestUnit
     public void setup() throws Exception
     {
         connection = ( LdapNetworkConnection ) LdapApiIntegrationUtils.getPooledAdminConnection( getLdapServer() );
-        connection.setTimeOut( 0 );
 
         // Restart the service so that the index is created
         getService().shutdown();
diff --git a/server-integ/src/test/java/MultiThreadedReadWriteTest.java b/server-integ/src/test/java/MultiThreadedReadWriteTest.java
index 8f990aa..9c142ce 100644
--- a/server-integ/src/test/java/MultiThreadedReadWriteTest.java
+++ b/server-integ/src/test/java/MultiThreadedReadWriteTest.java
@@ -152,7 +152,6 @@ public class MultiThreadedReadWriteTest
     {
         LdapNetworkConnection connection = new LdapNetworkConnection( Network.LOOPBACK_HOSTNAME, 10389 );
         connection.bind( "uid=admin,ou=system", "secret" );
-        connection.setTimeOut( Long.MAX_VALUE );
         
         return connection;
     }
diff --git a/server-integ/src/test/java/org/apache/directory/server/operations/add/AddAliasIT.java b/server-integ/src/test/java/org/apache/directory/server/operations/add/AddAliasIT.java
index 4e4901e..d5dfeb9 100644
--- a/server-integ/src/test/java/org/apache/directory/server/operations/add/AddAliasIT.java
+++ b/server-integ/src/test/java/org/apache/directory/server/operations/add/AddAliasIT.java
@@ -61,7 +61,6 @@ public class AddAliasIT extends AbstractLdapTestUnit
         try
         {
             conn = getAdminConnection( getLdapServer() );
-            conn.setTimeOut( -1L );
 
             conn.add( new DefaultEntry(
                 "cn=foo,ou=system",
@@ -98,7 +97,6 @@ public class AddAliasIT extends AbstractLdapTestUnit
         try
         {
             conn = getAdminConnection( getLdapServer() );
-            conn.setTimeOut( -1L );
 
             conn.add( new DefaultEntry(
                 "cn=foo,ou=system",
@@ -164,7 +162,6 @@ public class AddAliasIT extends AbstractLdapTestUnit
         try
         {
             conn = getAdminConnection( getLdapServer() );
-            conn.setTimeOut( -1L );
 
             conn.add( new DefaultEntry(
                 "cn=test,ou=system",
diff --git a/server-integ/src/test/java/org/apache/directory/server/operations/add/AddIT.java b/server-integ/src/test/java/org/apache/directory/server/operations/add/AddIT.java
index 35aeebe..8aedb55 100644
--- a/server-integ/src/test/java/org/apache/directory/server/operations/add/AddIT.java
+++ b/server-integ/src/test/java/org/apache/directory/server/operations/add/AddIT.java
@@ -1532,7 +1532,6 @@ public class AddIT extends AbstractLdapTestUnit
     public void testAddNullValue() throws LdapException, IOException
     {
         LdapConnection connection = new LdapNetworkConnection( Network.LOOPBACK_HOSTNAME, getLdapServer().getPort() );
-        connection.setTimeOut( 0L );
 
         // Use the client API
         connection.bind( "uid=admin,ou=system", "secret" );
@@ -1571,7 +1570,6 @@ public class AddIT extends AbstractLdapTestUnit
     public void testAddNullValueDirectoryString() throws LdapException, IOException
     {
         LdapConnection connection = new LdapNetworkConnection( Network.LOOPBACK_HOSTNAME, getLdapServer().getPort() );
-        connection.setTimeOut( 0L );
 
         // Use the client API
         connection.bind( "uid=admin,ou=system", "secret" );
diff --git a/server-integ/src/test/java/org/apache/directory/server/operations/add/AddingEntriesWithSpecialCharactersInRDNIT.java b/server-integ/src/test/java/org/apache/directory/server/operations/add/AddingEntriesWithSpecialCharactersInRDNIT.java
index 7de5a98..4c810c5 100644
--- a/server-integ/src/test/java/org/apache/directory/server/operations/add/AddingEntriesWithSpecialCharactersInRDNIT.java
+++ b/server-integ/src/test/java/org/apache/directory/server/operations/add/AddingEntriesWithSpecialCharactersInRDNIT.java
@@ -387,7 +387,6 @@ public class AddingEntriesWithSpecialCharactersInRDNIT extends AbstractLdapTestU
     public void testAddRdnWithEscapedSpaces() throws Exception
     {
         LdapConnection connection = getAdminConnection( getLdapServer() );
-        connection.setTimeOut( -1 );
 
         Entry entry = new DefaultEntry(
             "cn=\\ User, ou=system",
diff --git a/server-integ/src/test/java/org/apache/directory/server/operations/bind/DelegatedAuthIT.java b/server-integ/src/test/java/org/apache/directory/server/operations/bind/DelegatedAuthIT.java
index bc488f2..b179a70 100644
--- a/server-integ/src/test/java/org/apache/directory/server/operations/bind/DelegatedAuthIT.java
+++ b/server-integ/src/test/java/org/apache/directory/server/operations/bind/DelegatedAuthIT.java
@@ -106,7 +106,6 @@ public class DelegatedAuthIT extends AbstractLdapTestUnit
         assertEquals( "DelegatedAuthIT-method", getService().getInstanceId() );
         LdapConnection ldapConnection = new LdapNetworkConnection( Network.LOOPBACK_HOSTNAME, 10200 );
 
-        ldapConnection.setTimeOut( 0L );
         ldapConnection.bind( "uid=antoine,ou=users,ou=system", "secret" );
 
         assertTrue( ldapConnection.isAuthenticated() );
@@ -171,7 +170,6 @@ public class DelegatedAuthIT extends AbstractLdapTestUnit
         assertTrue( getService().isStarted() );
         assertEquals( "DelegatedAuthIT-MultipleAuthenticators-method", getService().getInstanceId() );
         LdapConnection ldapConnection = new LdapNetworkConnection( Network.LOOPBACK_HOSTNAME, 10200 );
-        ldapConnection.setTimeOut( 0L );
         ldapConnection.bind( "uid=emmanuel,ou=users,ou=system", "sesame" );
 
         assertTrue( ldapConnection.isAuthenticated() );
diff --git a/server-integ/src/test/java/org/apache/directory/server/operations/bind/DelegatedAuthOverSslIT.java b/server-integ/src/test/java/org/apache/directory/server/operations/bind/DelegatedAuthOverSslIT.java
index 0bac226..43d461b 100644
--- a/server-integ/src/test/java/org/apache/directory/server/operations/bind/DelegatedAuthOverSslIT.java
+++ b/server-integ/src/test/java/org/apache/directory/server/operations/bind/DelegatedAuthOverSslIT.java
@@ -113,7 +113,6 @@ public class DelegatedAuthOverSslIT extends AbstractLdapTestUnit
         assertEquals( "DelegatedAuthIT-method", getService().getInstanceId() );
         LdapConnection ldapConnection = new LdapNetworkConnection( Network.LOOPBACK_HOSTNAME, 10200 );
 
-        ldapConnection.setTimeOut( 0L );
         ldapConnection.bind( "uid=antoine,ou=users,ou=system", "secret" );
 
         assertTrue( ldapConnection.isAuthenticated() );
diff --git a/server-integ/src/test/java/org/apache/directory/server/operations/bind/DelegatedAuthOverTlsIT.java b/server-integ/src/test/java/org/apache/directory/server/operations/bind/DelegatedAuthOverTlsIT.java
index ab5c919..32bd581 100644
--- a/server-integ/src/test/java/org/apache/directory/server/operations/bind/DelegatedAuthOverTlsIT.java
+++ b/server-integ/src/test/java/org/apache/directory/server/operations/bind/DelegatedAuthOverTlsIT.java
@@ -113,7 +113,6 @@ public class DelegatedAuthOverTlsIT extends AbstractLdapTestUnit
         assertEquals( "DelegatedAuthIT-method", getService().getInstanceId() );
         LdapConnection ldapConnection = new LdapNetworkConnection( Network.LOOPBACK_HOSTNAME, 10200 );
 
-        ldapConnection.setTimeOut( 0L );
         ldapConnection.bind( "uid=antoine,ou=users,ou=system", "secret" );
 
         assertTrue( ldapConnection.isAuthenticated() );
diff --git a/server-integ/src/test/java/org/apache/directory/server/operations/bind/SaslBindIT.java b/server-integ/src/test/java/org/apache/directory/server/operations/bind/SaslBindIT.java
index 1f46b07..752e047 100644
--- a/server-integ/src/test/java/org/apache/directory/server/operations/bind/SaslBindIT.java
+++ b/server-integ/src/test/java/org/apache/directory/server/operations/bind/SaslBindIT.java
@@ -240,7 +240,6 @@ public class SaslBindIT extends AbstractLdapTestUnit
     public void testSaslBindPLAIN() throws Exception
     {
         LdapNetworkConnection connection = new LdapNetworkConnection( Network.LOOPBACK_HOSTNAME, getLdapServer().getPort() );
-        connection.setTimeOut( 0L );
 
         BindResponse resp = connection.bindSaslPlain( "hnelson", "secret" );
         assertEquals( ResultCodeEnum.SUCCESS, resp.getLdapResult().getResultCode() );
@@ -298,7 +297,6 @@ public class SaslBindIT extends AbstractLdapTestUnit
     {
         Dn userDn = new Dn( "uid=hnelson,ou=users,dc=example,dc=com" );
         LdapNetworkConnection connection = new LdapNetworkConnection( Network.LOOPBACK_HOSTNAME, getLdapServer().getPort() );
-        connection.setTimeOut( 0L );
 
         SaslCramMd5Request request = new SaslCramMd5Request();
         request.setUsername( userDn.getRdn().getValue() );
@@ -482,7 +480,6 @@ public class SaslBindIT extends AbstractLdapTestUnit
     {
         Dn userDn = new Dn( "uid=hnelson,ou=users,dc=example,dc=com" );
         LdapNetworkConnection connection = new LdapNetworkConnection( Network.LOOPBACK_HOSTNAME, getLdapServer().getPort() );
-        connection.setTimeOut( 0L );
 
         kdcServer.getConfig().setPaEncTimestampRequired( false );
 
diff --git a/server-integ/src/test/java/org/apache/directory/server/operations/bind/SimpleBindIT.java b/server-integ/src/test/java/org/apache/directory/server/operations/bind/SimpleBindIT.java
index a3a5f9e..188e450 100644
--- a/server-integ/src/test/java/org/apache/directory/server/operations/bind/SimpleBindIT.java
+++ b/server-integ/src/test/java/org/apache/directory/server/operations/bind/SimpleBindIT.java
@@ -467,7 +467,6 @@ public class SimpleBindIT extends AbstractLdapTestUnit
     public void testBindSimpleAuthenticatorDisabled() throws Exception
     {
         LdapConnection connection = new LdapNetworkConnection( Network.LOOPBACK_HOSTNAME, getLdapServer().getPort() );
-        connection.setTimeOut( 0 );
 
         try
         {
diff --git a/server-integ/src/test/java/org/apache/directory/server/operations/extended/PwdModifyIT.java b/server-integ/src/test/java/org/apache/directory/server/operations/extended/PwdModifyIT.java
index 71df9b4..dfe769e 100644
--- a/server-integ/src/test/java/org/apache/directory/server/operations/extended/PwdModifyIT.java
+++ b/server-integ/src/test/java/org/apache/directory/server/operations/extended/PwdModifyIT.java
@@ -221,7 +221,6 @@ public class PwdModifyIT extends AbstractLdapTestUnit
 
         // Bind as the user
         LdapConnection userConnection = getNetworkConnectionAs( getLdapServer(), "cn=user1,ou=system", "secret1" );
-        userConnection.setTimeOut( 0L );
 
         // Now change the password
         PasswordModifyRequest pwdModifyRequest = new PasswordModifyRequestImpl();
@@ -264,7 +263,6 @@ public class PwdModifyIT extends AbstractLdapTestUnit
 
         // Bind as the user
         LdapConnection anonymousConnection = getAnonymousNetworkConnection( getLdapServer() );
-        anonymousConnection.setTimeOut( 0L );
 
         // Now change the password
         PasswordModifyRequest pwdModifyRequest = new PasswordModifyRequestImpl();
@@ -317,7 +315,6 @@ public class PwdModifyIT extends AbstractLdapTestUnit
 
         // Bind as the user
         LdapConnection anonymousConnection = getAnonymousNetworkConnection( getLdapServer() );
-        anonymousConnection.setTimeOut( 0L );
 
         // Now change the password
         PasswordModifyRequest pwdModifyRequest = new PasswordModifyRequestImpl();
@@ -512,7 +509,6 @@ public class PwdModifyIT extends AbstractLdapTestUnit
         try
         {
             adminConnection = getAdminNetworkConnection( getLdapServer() );
-            adminConnection.setTimeOut( Long.MAX_VALUE );
             addUser( adminConnection, "UserXY", "secret3" );
             Dn userDn = new Dn( "cn=UserXY,ou=system" );
 
@@ -568,7 +564,6 @@ public class PwdModifyIT extends AbstractLdapTestUnit
 
         // Bind as the user
         LdapConnection userConnection = getNetworkConnectionAs( getLdapServer(), "cn=user11,ou=system", "secret1" );
-        userConnection.setTimeOut( 0L );
 
         // Now change the password
         PasswordModifyRequest pwdModifyRequest = new PasswordModifyRequestImpl();
diff --git a/server-integ/src/test/java/org/apache/directory/server/operations/extended/WhoAmIIT.java b/server-integ/src/test/java/org/apache/directory/server/operations/extended/WhoAmIIT.java
index 9d4411b..f3518d0 100644
--- a/server-integ/src/test/java/org/apache/directory/server/operations/extended/WhoAmIIT.java
+++ b/server-integ/src/test/java/org/apache/directory/server/operations/extended/WhoAmIIT.java
@@ -65,8 +65,6 @@ public class WhoAmIIT extends AbstractLdapTestUnit
     {
         LdapConnection adminConnection = getAdminNetworkConnection( getLdapServer() );
 
-        adminConnection.setTimeOut( 0L );
-
         // Create a new RBAC session
         WhoAmIRequest whoAmIRequest = new WhoAmIRequestImpl();
 
diff --git a/server-integ/src/test/java/org/apache/directory/server/operations/lookup/LookupIT.java b/server-integ/src/test/java/org/apache/directory/server/operations/lookup/LookupIT.java
index 119cc81..d0ed6cb 100644
--- a/server-integ/src/test/java/org/apache/directory/server/operations/lookup/LookupIT.java
+++ b/server-integ/src/test/java/org/apache/directory/server/operations/lookup/LookupIT.java
@@ -53,7 +53,6 @@ public class LookupIT extends AbstractLdapTestUnit
     public void testLookupExistingEntryAPI() throws Exception
     {
         LdapConnection connection = ServerIntegrationUtils.getAdminConnection( getLdapServer() );
-        connection.setTimeOut( 0L );
 
         Entry entry = connection.lookup( "uid=admin,ou=system", "name" );
         assertNotNull( entry );
@@ -74,7 +73,6 @@ public class LookupIT extends AbstractLdapTestUnit
     public void testLookupRootDSE() throws Exception
     {
         LdapConnection connection = ServerIntegrationUtils.getAdminConnection( getLdapServer() );
-        connection.setTimeOut( 0L );
 
         Entry entry = connection.lookup( "" );
         assertNotNull( entry );
diff --git a/server-integ/src/test/java/org/apache/directory/server/operations/modify/ModifyAddIT.java b/server-integ/src/test/java/org/apache/directory/server/operations/modify/ModifyAddIT.java
index bab5ebf..1829aa1 100644
--- a/server-integ/src/test/java/org/apache/directory/server/operations/modify/ModifyAddIT.java
+++ b/server-integ/src/test/java/org/apache/directory/server/operations/modify/ModifyAddIT.java
@@ -705,7 +705,6 @@ public class ModifyAddIT extends AbstractLdapTestUnit
     public void testModifyAddWithNullValues() throws LdapException, IOException
     {
         LdapConnection connection = new LdapNetworkConnection( Network.LOOPBACK_HOSTNAME, getLdapServer().getPort() );
-        connection.setTimeOut( 0L );
 
         // Use the client API
         connection.bind( "uid=admin,ou=system", "secret" );
@@ -747,7 +746,6 @@ public class ModifyAddIT extends AbstractLdapTestUnit
     public void testModifyReplaceWithNullValues() throws LdapException, IOException
     {
         LdapConnection connection = new LdapNetworkConnection( Network.LOOPBACK_HOSTNAME, getLdapServer().getPort() );
-        connection.setTimeOut( 0L );
 
         // Use the client API
         connection.bind( "uid=admin,ou=system", "secret" );
diff --git a/server-integ/src/test/java/org/apache/directory/server/operations/modifydn/ModifyRdnIT.java b/server-integ/src/test/java/org/apache/directory/server/operations/modifydn/ModifyRdnIT.java
index d562be8..dce0e94 100644
--- a/server-integ/src/test/java/org/apache/directory/server/operations/modifydn/ModifyRdnIT.java
+++ b/server-integ/src/test/java/org/apache/directory/server/operations/modifydn/ModifyRdnIT.java
@@ -131,7 +131,6 @@ public class ModifyRdnIT extends AbstractLdapTestUnit
     public void testModifyRdnAndDeleteOld() throws Exception
     {
         LdapConnection connection = ServerIntegrationUtils.getAdminConnection( getLdapServer() );
-        //connection.setTimeOut( 0L );
         connection.loadSchema();
 
         // Create a person, cn value is rdn
@@ -187,7 +186,6 @@ public class ModifyRdnIT extends AbstractLdapTestUnit
     public void testModifyRdnAndDeleteOldWithSearchInBetween() throws Exception
     {
         LdapConnection connection = ServerIntegrationUtils.getAdminConnection( getLdapServer() );
-        // connection.setTimeOut( 0L );
         connection.loadSchema();
 
         // Create a person, cn value is rdn
diff --git a/server-integ/src/test/java/org/apache/directory/server/operations/search/SearchPerfIT.java b/server-integ/src/test/java/org/apache/directory/server/operations/search/SearchPerfIT.java
index 1ffe180..a76fefa 100644
--- a/server-integ/src/test/java/org/apache/directory/server/operations/search/SearchPerfIT.java
+++ b/server-integ/src/test/java/org/apache/directory/server/operations/search/SearchPerfIT.java
@@ -333,7 +333,6 @@ public class SearchPerfIT extends AbstractLdapTestUnit
     public void testSearchRequestSubtreeLevelScopePerf() throws Exception
     {
         LdapConnection connection = new LdapNetworkConnection( Network.LOOPBACK_HOSTNAME, getLdapServer().getPort() );
-        connection.setTimeOut( 0 );
 
         try
         {
@@ -435,7 +434,6 @@ public class SearchPerfIT extends AbstractLdapTestUnit
     public void testSearch100kUsers() throws LdapException, CursorException, InterruptedException, Exception
     {
         LdapConnection connection = new LdapNetworkConnection( Network.LOOPBACK_HOSTNAME, getLdapServer().getPort() );
-        connection.setTimeOut(0L);
         connection.bind( "uid=admin,ou=system", "secret" );
         int nbAdds = 10_000;
 
diff --git a/server-integ/src/test/java/org/apache/directory/server/operations/search/SortedSearchIT.java b/server-integ/src/test/java/org/apache/directory/server/operations/search/SortedSearchIT.java
index c52ef5a..5f43084 100644
--- a/server-integ/src/test/java/org/apache/directory/server/operations/search/SortedSearchIT.java
+++ b/server-integ/src/test/java/org/apache/directory/server/operations/search/SortedSearchIT.java
@@ -91,7 +91,6 @@ public class SortedSearchIT extends AbstractLdapTestUnit
         {
             con = new LdapNetworkConnection( Network.LOOPBACK_HOSTNAME, getLdapServer().getPort() );
             con.bind( "uid=admin,ou=system", "secret" );
-            con.setTimeOut( Long.MAX_VALUE );
         }
 
         baseDn = new Dn( "ou=parent,ou=system" );
diff --git a/server-integ/src/test/java/org/apache/directory/server/ppolicy/PasswordPolicyIT.java b/server-integ/src/test/java/org/apache/directory/server/ppolicy/PasswordPolicyIT.java
index 2f0c14f..d6173a1 100644
--- a/server-integ/src/test/java/org/apache/directory/server/ppolicy/PasswordPolicyIT.java
+++ b/server-integ/src/test/java/org/apache/directory/server/ppolicy/PasswordPolicyIT.java
@@ -749,8 +749,6 @@ public class PasswordPolicyIT extends AbstractLdapTestUnit
 
         try (LdapConnection userCon = new LdapNetworkConnection( Network.LOOPBACK_HOSTNAME, ldapServer.getPort() ))
         {
-            userCon.setTimeOut( 0 );
-    
             Thread.sleep( 1000 ); // sleep for one second so that the password expire warning will be sent
     
             BindResponse bindResp = userCon.bind( bindReq );
@@ -798,8 +796,6 @@ public class PasswordPolicyIT extends AbstractLdapTestUnit
 
         try (LdapConnection userCon = new LdapNetworkConnection( Network.LOOPBACK_HOSTNAME, ldapServer.getPort() ))
         {
-            userCon.setTimeOut( 0 );
-    
             Thread.sleep( 1000 ); // sleep for one second so that the password expire warning will be sent
     
             BindResponse bindResp = userCon.bind( bindReq );
@@ -861,8 +857,6 @@ public class PasswordPolicyIT extends AbstractLdapTestUnit
 
         try (LdapConnection userCon = new LdapNetworkConnection( Network.LOOPBACK_HOSTNAME, ldapServer.getPort() ))
         {
-            userCon.setTimeOut( 0 );
-    
             Thread.sleep( 1000 ); // sleep for one second so that the password expire warning will be sent
     
             BindResponse bindResp = userCon.bind( bindReq );
@@ -925,8 +919,6 @@ public class PasswordPolicyIT extends AbstractLdapTestUnit
 
         try (LdapConnection userCon = new LdapNetworkConnection( Network.LOOPBACK_HOSTNAME, ldapServer.getPort() ))
         {
-            userCon.setTimeOut( 0 );
-    
             Thread.sleep( 1000 ); // sleep for one second so that the password expire warning will be sent
     
             BindResponse bindResp = userCon.bind( bindReq );
@@ -1100,7 +1092,6 @@ public class PasswordPolicyIT extends AbstractLdapTestUnit
         bindReq.setDn( userDn );
         bindReq.setCredentials( "12345" ); // correct password
         bindReq.addControl( PP_REQ_CTRL );
-        userConnection.setTimeOut( Long.MAX_VALUE );
         userConnection.bind( bindReq );
         assertTrue( userConnection.isAuthenticated() );
 
@@ -1126,7 +1117,6 @@ public class PasswordPolicyIT extends AbstractLdapTestUnit
         addUser( adminConnection, "userLockout", "12345" );
 
         LdapConnection userConnection = new LdapNetworkConnection( Network.LOOPBACK_HOSTNAME, ldapServer.getPort() );
-        userConnection.setTimeOut( 0L );
 
         checkBind( userConnection, userDn, "badPassword", 3,
             "INVALID_CREDENTIALS: Bind failed: ERR_229 Cannot authenticate user cn=userLockout,ou=system" );
@@ -1160,7 +1150,6 @@ public class PasswordPolicyIT extends AbstractLdapTestUnit
         addUser( adminConnection, "userLockout2", "12345" );
 
         LdapConnection userConnection = new LdapNetworkConnection( Network.LOOPBACK_HOSTNAME, ldapServer.getPort() );
-        userConnection.setTimeOut( 0L );
 
         checkBind( userConnection, userDn, "badPassword", 3,
             "INVALID_CREDENTIALS: Bind failed: ERR_229 Cannot authenticate user cn=userLockout2,ou=system" );
@@ -1219,7 +1208,6 @@ public class PasswordPolicyIT extends AbstractLdapTestUnit
         addUser( adminConnection, "userLockout3", "12345" );
 
         LdapConnection userConnection = new LdapNetworkConnection( Network.LOOPBACK_HOSTNAME, ldapServer.getPort() );
-        userConnection.setTimeOut( 0L );
 
         // First attempt
         checkBind( userConnection, userDn, "badPassword", 1,
@@ -1356,8 +1344,6 @@ public class PasswordPolicyIT extends AbstractLdapTestUnit
 
         try (LdapConnection userConnection = new LdapNetworkConnection( Network.LOOPBACK_HOSTNAME, ldapServer.getPort() ))
         {
-            userConnection.setTimeOut( 0L );
-    
             // We should be able to bind
             checkBindSuccess( userDn, "12345" );
         }
@@ -1371,8 +1357,6 @@ public class PasswordPolicyIT extends AbstractLdapTestUnit
             modReq.addControl( PP_REQ_CTRL );
             modReq.replace( "userPassword", "67890" );
 
-            userConnection.setTimeOut( 0L );
-    
             ModifyResponse modifyResponse = userConnection.modify( modReq );
     
             assertEquals( ResultCodeEnum.INSUFFICIENT_ACCESS_RIGHTS, modifyResponse.getLdapResult().getResultCode() );
@@ -1410,9 +1394,7 @@ public class PasswordPolicyIT extends AbstractLdapTestUnit
             String password = "12345";
             adminConnection = getAdminNetworkConnection( getLdapServer() );
             userConnection = new LdapNetworkConnection( Network.LOOPBACK_HOSTNAME, ldapServer.getPort() );
-            userConnection.setTimeOut( 0L );
             userConnection2 = new LdapNetworkConnection( Network.LOOPBACK_HOSTNAME, ldapServer.getPort() );
-            userConnection2.setTimeOut( 0L );
 
             addUser( adminConnection, userCn, password );
 
diff --git a/server-integ/src/test/java/org/apache/directory/server/replication/MockSyncReplConsumer.java b/server-integ/src/test/java/org/apache/directory/server/replication/MockSyncReplConsumer.java
index 53253c2..76245b0 100644
--- a/server-integ/src/test/java/org/apache/directory/server/replication/MockSyncReplConsumer.java
+++ b/server-integ/src/test/java/org/apache/directory/server/replication/MockSyncReplConsumer.java
@@ -222,7 +222,6 @@ public class MockSyncReplConsumer implements ConnectionClosedEventListener, Repl
             if ( connection == null )
             {
                 connection = new LdapNetworkConnection( providerHost, port );
-                connection.setTimeOut( 10000L );
 
                 if ( config.isUseTls() )
                 {