From commits-return-51082-archive-asf-public=cust-asf.ponee.io@directory.apache.org Thu May 9 22:40:21 2019 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [207.244.88.153]) by mx-eu-01.ponee.io (Postfix) with SMTP id 3A6BA180784 for ; Fri, 10 May 2019 00:40:21 +0200 (CEST) Received: (qmail 42074 invoked by uid 500); 9 May 2019 22:40:20 -0000 Mailing-List: contact commits-help@directory.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@directory.apache.org Delivered-To: mailing list commits@directory.apache.org Received: (qmail 41957 invoked by uid 99); 9 May 2019 22:40:20 -0000 Received: from ec2-52-202-80-70.compute-1.amazonaws.com (HELO gitbox.apache.org) (52.202.80.70) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 09 May 2019 22:40:20 +0000 Received: by gitbox.apache.org (ASF Mail Server at gitbox.apache.org, from userid 33) id 4ABAA872EB; Thu, 9 May 2019 22:40:20 +0000 (UTC) Date: Thu, 09 May 2019 22:40:23 +0000 To: "commits@directory.apache.org" Subject: [directory-server] 03/03: Slightly improve the test that loop on bind/unbind to avoid printing thousands of lines MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit From: elecharny@apache.org In-Reply-To: <155744162013.14347.11032505331467694933@gitbox.apache.org> References: <155744162013.14347.11032505331467694933@gitbox.apache.org> X-Git-Host: gitbox.apache.org X-Git-Repo: directory-server X-Git-Refname: refs/heads/master X-Git-Reftype: branch X-Git-Rev: 9f3401f320781998c1b091424d110884dc6c3f59 X-Git-NotificationType: diff X-Git-Multimail-Version: 1.5.dev Auto-Submitted: auto-generated Message-Id: <20190509224020.4ABAA872EB@gitbox.apache.org> This is an automated email from the ASF dual-hosted git repository. elecharny pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/directory-server.git commit 9f3401f320781998c1b091424d110884dc6c3f59 Author: emmanuel lecharny AuthorDate: Fri May 10 00:40:15 2019 +0200 Slightly improve the test that loop on bind/unbind to avoid printing thousands of lines --- .../client/api/operations/bind/SimpleBindRequestTest.java | 7 +++++-- .../directory/server/operations/bind/SimpleBindIT.java | 13 ++++++++++--- 2 files changed, 15 insertions(+), 5 deletions(-) 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 f2a6bce..102e4c7 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 @@ -658,9 +658,12 @@ public class SimpleBindRequestTest extends AbstractLdapTestUnit @Test public void testSimpleBindAndUnbindLoop() throws Exception { - for ( int i = 0; i < 10000; i++ ) + for ( int i = 0; i < 1000; i++ ) { - System.out.println( i ); + if ( i % 100 == 0 ) + { + System.out.println( i ); + } connection.bind( "uid=admin,ou=system", "secret" ); assertTrue( connection.isAuthenticated() ); 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 cdc3ad8..30a3ad8 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 @@ -523,12 +523,16 @@ public class SimpleBindIT extends AbstractLdapTestUnit @Test public void testSimpleBindAndUnbindLoop() throws Exception { + long t0 = System.currentTimeMillis(); try ( LdapNetworkConnection connection = new LdapNetworkConnection( Network.LOOPBACK_HOSTNAME, getLdapServer().getPort() ) ) { - for ( int i = 0; i < 10000; i++ ) + for ( int i = 0; i < 1000; i++ ) { - System.out.println( i ); + if ( i % 100 == 0 ) + { + System.out.println( i ); + } connection.bind( "uid=admin,ou=system", "secret" ); assertTrue( connection.isAuthenticated() ); @@ -536,9 +540,12 @@ public class SimpleBindIT extends AbstractLdapTestUnit connection.unBind(); assertFalse( connection.isAuthenticated() ); - // Thread.sleep( 10L ); + // Thread.sleep( 2L ); } } + long t1 = System.currentTimeMillis(); + + System.out.println( "Delta = " + ( t1 - t0 ) ); } }