New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
LDAP Sampler: Multiple values for single attribute not possible #1557
Labels
Comments
MLowings (migrated from Bugzilla): Created attachment patchfile.txt: Changed from using BasicAttributes interface to Attributes interface. patchfile.txtdiff -uw jmeter211.org/LdapExtClient.java /home/mlowings/apps/ifolder/mlowings/IdeaProjects/JmeterNovellExtLdapClasses/src/org/apache/jmeter/protocol/ldap/sampler/LdapExtClient.java
--- jmeter211.org/LdapExtClient.java 2006-02-09 14:05:01.000000000 +0000
+++ /home/mlowings/apps/ifolder/mlowings/IdeaProjects/JmeterNovellExtLdapClasses/src/org/apache/jmeter/protocol/ldap/sampler/LdapExtClient.java 2006-02-09 14:11:15.000000000 +0000
@@ -1,5 +1,4 @@
-
-//$Header$
+//$Header: /home/cvs/jakarta-jmeter/src/protocol/ldap/org/apache/jmeter/protocol/ldap/sampler/LdapExtClient.java,v 1.4 2005/07/12 20:50:44 mstover1 Exp $
/*
* Copyright 2003-2004 The Apache Software Foundation.
*
@@ -24,7 +23,7 @@
import javax.naming.Context;
import javax.naming.NamingException;
import javax.naming.NamingEnumeration;
-import javax.naming.directory.BasicAttributes;
+import javax.naming.directory.Attributes;
import javax.naming.directory.DirContext;
import javax.naming.directory.InitialDirContext;
import javax.naming.directory.ModificationItem;
@@ -161,16 +160,16 @@
}
/***************************************************************************
- * Create the attribute in the ldap directory for the given string
+ * Create the entry in the ldap directory for the given string
*
- * @param basicattributes
- * add all the entry in to the basicattribute
+ * @param attributes
+ * add all the attributes and values from the attributes object
* @param string
* The string (dn) value
**************************************************************************/
- public void createTest(DirContext dirContext, BasicAttributes basicattributes, String string)
+ public void createTest(DirContext dirContext, Attributes attributes, String string)
throws NamingException {
- dirContext.createSubcontext(string, basicattributes);
+ dirContext.createSubcontext(string, attributes);
}
/***************************************************************************
diff -uw jmeter211.org/LDAPExtSampler.java /home/mlowings/apps/ifolder/mlowings/IdeaProjects/JmeterNovellExtLdapClasses/src/org/apache/jmeter/protocol/ldap/sampler/LDAPExtSampler.java
--- jmeter211.org/LDAPExtSampler.java 2006-02-09 13:34:02.000000000 +0000
+++ /home/mlowings/apps/ifolder/mlowings/IdeaProjects/JmeterNovellExtLdapClasses/src/org/apache/jmeter/protocol/ldap/sampler/LDAPExtSampler.java 2006-02-09 13:59:31.000000000 +0000
@@ -1,4 +1,4 @@
-//$Header$
+//$Header: /home/cvs/jakarta-jmeter/src/protocol/ldap/org/apache/jmeter/protocol/ldap/sampler/LDAPExtSampler.java,v 1.10 2005/07/12 20:50:44 mstover1 Exp $
/*
* Copyright 2003-2005 The Apache Software Foundation.
*
@@ -24,6 +24,7 @@
import javax.naming.NamingException;
import javax.naming.directory.Attribute;
+import javax.naming.directory.Attributes;
import javax.naming.directory.BasicAttribute;
import javax.naming.directory.BasicAttributes;
import javax.naming.directory.SearchResult;
@@ -478,14 +479,14 @@
}
/***************************************************************************
- * Collect all the value from the table (Arguments), using this create the
- * basicAttributes This will create the Basic Attributes for the User
+ * Collect all the values from the table (Arguments), using this create the
+ * Attributes, this will create the Attributes for the User
* defined TestCase for Add Test
*
- * @return The BasicAttributes
+ * @return The Attributes
**************************************************************************/
- public BasicAttributes getUserAttributes() {
- BasicAttributes attrs = new BasicAttributes(true);
+ public Attributes getUserAttributes() {
+ Attributes attrs = new BasicAttributes(true);
Attribute attr;
PropertyIterator iter = getArguments().iterator();
|
Sebb (migrated from Bugzilla): |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Andreas Oetjen (Bug 35244):
When creating a new entry the LDAP sampler ("add test"), it is not possible to
specify more than one value for an attribute in the table.
Example: I want to create a new group "G" and assign two users "A" and "B" to
this group. Therefore, I enter in the attributes table:
"name" -> "G"
"objectClass" -> "group"
"member" -> "cn=A,ou=Users,dc=domain,dc=net"
"member" -> "cn=B,ou=Users,dc=domain,dc=net"
As you can see, I somehow need to specify two values for the member attribute,
which should be no problem in LDAP. But JMeter seems to overwrite the first
"member" attribute, so the new Group "G" has only "B" as a member.
Or is there another syntax to specify more than one value?
Severity: normal
OS: Windows XP
The text was updated successfully, but these errors were encountered: