Bug 48573 - LDAPExtSampler directory context handling
LDAPExtSampler directory context handling
Product: JMeter
Classification: Unclassified
Component: Main
All All
: P2 normal (vote)
: ---
Assigned To: JMeter issues mailing list
: PatchAvailable
Depends on:
  Show dependency tree
Reported: 2010-01-19 07:56 UTC by Rainer Jung
Modified: 2010-01-20 15:52 UTC (History)
0 users

Patch against trunk r900635 (14.54 KB, patch)
2010-01-19 07:56 UTC, Rainer Jung
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Rainer Jung 2010-01-19 07:56:23 UTC
Created attachment 24860 [details]
Patch against trunk r900635

LdapExtSampler has two Hashtables: ldapContexts and ldapConnections. One should cache DirContext instances per thread, the other LDAPExtClient instances.

But inspection of the class LDAPExtClient shows, that all of it's method can be declared static. All data needed is always passed in as method arguments. So there's no need to use a Hashtable of instances. Also: the ldapConnections Hashtable wasn't filled correctly. So let's turn to static methods and remove the Hashtable.

It seems the ext ldap sampler was broken for more complex bind, search, unbind tests and at least those work with the patch applied.

Patch is against trunk, but the same situation occurs in 2.3.4.
Comment 1 Sebb 2010-01-20 15:52:21 UTC
Good catch:

URL: http://svn.apache.org/viewvc?rev=901444&view=rev
Bug 48573 - LDAPExtSampler directory context handling