opends/tests/system-tests/scenario/singleServer/clients/secureSearch/secureSearchPostamble.xml
@@ -56,7 +56,7 @@ <!-- parse the client parameters : --> <!-- params is [[param1,val1],[param2,val2],...] --> <!-- get the ldap instance parameters --> <import machine="'%s' % (STAF_LOCAL_HOSTNAME)" <import machine="'%s' % (client.getHost())" file="'%s/%sLib.xml' % (client.getPath(),client.getName())"/> <call function="'%sParser' % client.getName()"> { @@ -80,7 +80,7 @@ </call> <script> errNum += 1 </script> </script> </sequence> <else> <sequence> opends/tests/system-tests/scenario/singleServer/clients/secureSearch/secureSearchPreamble.xml
@@ -56,7 +56,7 @@ <!-- parse the client parameters : --> <!-- params is [[param1,val1],[param2,val2],...] --> <!-- get the ldap instance parameters --> <import machine="'%s' % (STAF_LOCAL_HOSTNAME)" <import machine="'%s' % (client.getHost())" file="'%s/%sLib.xml' % (client.getPath(),client.getName())"/> <call function="'%sParser' % client.getName()"> { opends/tests/system-tests/scenario/singleServer/clients/secureSearch/src/Client.java
@@ -27,9 +27,7 @@ import java.io.*; import java.lang.Thread; import javax.naming.*; //import javax.naming.directory.InitialDirContext; import javax.naming.directory.SearchControls; //import javax.naming.directory.DirContext; import javax.naming.directory.SearchResult; import javax.naming.directory.Attributes; import javax.naming.ldap.*; @@ -73,6 +71,12 @@ DNList=new ArrayList<String>(); uidList=new ArrayList<String>(); /* * Execute a search on baseDN to get the list of uid * and set the DNlist * This connexion can be secure or not depending of the client's configuration * the BindDN is directory manager */ try { Hashtable envLdap = set_properties_LDAP_simpleBind(); @@ -121,15 +125,15 @@ e.printStackTrace(); System.exit(1); } try { // execute the threads for (int i=0; i < nb_threads; i++ ) { Worker w = new Worker(this, server); } println ("INFO", nb_threads + " threads connected to server " + server ); // Wait until all the threads have initialized their context @@ -158,6 +162,7 @@ long new_t1=System.currentTimeMillis(); long print_t2=System.currentTimeMillis(); // end of the system test. Exit if ( ( timeTostopTest != 0 ) && ( new_t1 > timeTostopTest ) ) { @@ -185,7 +190,7 @@ // status every second if ( (new_t1 - t1) >= delayCnx ) { // println("INFO", (nb_srchs_done/delaySec) + " srch/sec."); // inform all the threads the max nb searchs has been reached opends/tests/system-tests/scenario/singleServer/clients/secureSearch/src/Worker.java
@@ -32,9 +32,7 @@ import javax.naming.directory.SearchResult; import javax.naming.directory.Attributes; import javax.naming.directory.Attribute; //import javax.naming.directory.DirContext; import javax.naming.Context; //import javax.naming.directory.InitialDirContext; import javax.naming.ldap.*; import javax.naming.ldap.StartTlsResponse; import javax.naming.ldap.StartTlsRequest; @@ -63,8 +61,6 @@ public void run() { String value=""; try { LdapContext ctx = null; @@ -83,7 +79,7 @@ // no sasl authentication // use a random DN to bind if ( client.authentication.equals("simple")) { String bindDN=(String) client.DNList.get(client.random.nextInt(client.DNList.size())); String bindPW="userpassword";