You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@directory.apache.org by el...@apache.org on 2005/05/24 08:39:39 UTC
svn commit: r178110 -
/directory/sandbox/trunk/asn1-new-codec/src/test/org/apache/asn1/ldap/codec/utils/LdapDNTest.java
Author: elecharny
Date: Mon May 23 23:39:39 2005
New Revision: 178110
URL: http://svn.apache.org/viewcvs?rev=178110&view=rev
Log:
Suppressed the pooling mechanism
Modified:
directory/sandbox/trunk/asn1-new-codec/src/test/org/apache/asn1/ldap/codec/utils/LdapDNTest.java
Modified: directory/sandbox/trunk/asn1-new-codec/src/test/org/apache/asn1/ldap/codec/utils/LdapDNTest.java
URL: http://svn.apache.org/viewcvs/directory/sandbox/trunk/asn1-new-codec/src/test/org/apache/asn1/ldap/codec/utils/LdapDNTest.java?rev=178110&r1=178109&r2=178110&view=diff
==============================================================================
--- directory/sandbox/trunk/asn1-new-codec/src/test/org/apache/asn1/ldap/codec/utils/LdapDNTest.java (original)
+++ directory/sandbox/trunk/asn1-new-codec/src/test/org/apache/asn1/ldap/codec/utils/LdapDNTest.java Mon May 23 23:39:39 2005
@@ -21,16 +21,6 @@
import org.apache.asn1.DecoderException;
import org.apache.asn1.ldap.codec.primitives.LdapDN;
-import org.apache.asn1.util.MutableString1024Factory;
-import org.apache.asn1.util.MutableString128Factory;
-import org.apache.asn1.util.MutableString16Factory;
-import org.apache.asn1.util.MutableString256Factory;
-import org.apache.asn1.util.MutableString32Factory;
-import org.apache.asn1.util.MutableString512Factory;
-import org.apache.asn1.util.MutableString64Factory;
-import org.apache.asn1.util.MutableStringFactory;
-import org.apache.asn1.util.pools.LocalPoolManager;
-import org.apache.asn1.util.pools.PoolEnum;
import org.apache.log4j.Logger;
import org.apache.log4j.PropertyConfigurator;
@@ -51,9 +41,6 @@
}
//~ Instance fields ----------------------------------------------------------------------------
- /** The logger */
- private LocalPoolManager poolMgr;
-
//~ Methods ------------------------------------------------------------------------------------
/**
@@ -61,18 +48,6 @@
*/
protected void setUp()
{
- // We have to create the pools, which are MutableString
- // pools. We will initialize 8 pools.
- poolMgr = new LocalPoolManager( 60, true );
-
- poolMgr.initPool(PoolEnum.STRING_POOL_16, new MutableString16Factory(), 1024, 1024);
- poolMgr.initPool(PoolEnum.STRING_POOL_32, new MutableString32Factory(), 1024, 1024);
- poolMgr.initPool(PoolEnum.STRING_POOL_64, new MutableString64Factory(), 1024, 1024);
- poolMgr.initPool(PoolEnum.STRING_POOL_128, new MutableString128Factory(), 1024, 1024);
- poolMgr.initPool(PoolEnum.STRING_POOL_256, new MutableString256Factory(), 1024, 1024);
- poolMgr.initPool(PoolEnum.STRING_POOL_512, new MutableString512Factory(), 1024, 1024);
- poolMgr.initPool(PoolEnum.STRING_POOL_1024, new MutableString1024Factory(), 1024, 1024);
- poolMgr.initPool(PoolEnum.STREAMED_STRING_POOL, new MutableStringFactory(), 1024, 1024);
}
/**
@@ -96,7 +71,7 @@
*/
public void testLdapDNNull() throws DecoderException
{
- Assert.assertEquals( "", LdapDN.parseDN( poolMgr, null ).toString() );
+ Assert.assertEquals( "", LdapDN.parseDN( null ).toString() );
}
/**
@@ -104,7 +79,7 @@
*/
public void testLdapDNEmpty() throws DecoderException
{
- Assert.assertEquals( "", LdapDN.parseDN( poolMgr, "".getBytes() ).toString() );
+ Assert.assertEquals( "", LdapDN.parseDN( "".getBytes() ).toString() );
}
/**
@@ -112,7 +87,7 @@
*/
public void testLdapDNSimple() throws DecoderException
{
- Assert.assertEquals( "a = b", LdapDN.parseDN( poolMgr, "a = b".getBytes() ).toString() );
+ Assert.assertEquals( "a = b", LdapDN.parseDN( "a = b".getBytes() ).toString() );
}
/**
@@ -120,7 +95,7 @@
*/
public void testLdapDNComposite() throws DecoderException
{
- Assert.assertEquals( "a = b, c = d", LdapDN.parseDN( poolMgr, "a = b, c = d".getBytes() ).toString() );
+ Assert.assertEquals( "a = b, c = d", LdapDN.parseDN( "a = b, c = d".getBytes() ).toString() );
}
/**
@@ -129,7 +104,7 @@
public void testLdapDNCompositeWithSpace() throws DecoderException
{
Assert.assertEquals( "a=b, a =b, a= b, a = b, a = b",
- LdapDN.parseDN( poolMgr, "a=b, a =b, a= b, a = b, a = b".getBytes() ).toString() );
+ LdapDN.parseDN( "a=b, a =b, a= b, a = b, a = b".getBytes() ).toString() );
}
/**
@@ -138,7 +113,7 @@
*/
public void testLdapDNCompositeSepators() throws DecoderException
{
- Assert.assertEquals( "a=b,c=d,e=f", LdapDN.parseDN( poolMgr, "a=b;c=d,e=f".getBytes() ).toString() );
+ Assert.assertEquals( "a=b,c=d,e=f", LdapDN.parseDN( "a=b;c=d,e=f".getBytes() ).toString() );
}
/**
@@ -147,7 +122,7 @@
public void testLdapDNSimpleMultivaluedAttribute() throws DecoderException
{
Assert.assertEquals( "a = b + c = d",
- LdapDN.parseDN( poolMgr, "a = b + c = d".getBytes() ).toString() );
+ LdapDN.parseDN( "a = b + c = d".getBytes() ).toString() );
}
/**
@@ -156,7 +131,7 @@
public void testLdapDNCompositeMultivaluedAttribute() throws DecoderException
{
Assert.assertEquals( "a=b+c=d, e=f + g=h + i=j",
- LdapDN.parseDN( poolMgr, "a=b+c=d, e=f + g=h + i=j".getBytes() ).toString() );
+ LdapDN.parseDN( "a=b+c=d, e=f + g=h + i=j".getBytes() ).toString() );
}
/**
@@ -165,7 +140,7 @@
public void testLdapDNOidUpper() throws DecoderException
{
Assert.assertEquals( "OID.12.34.56 = azerty",
- LdapDN.parseDN( poolMgr, "OID.12.34.56 = azerty".getBytes() ).toString() );
+ LdapDN.parseDN( "OID.12.34.56 = azerty".getBytes() ).toString() );
}
/**
@@ -174,7 +149,7 @@
public void testLdapDNOidLower() throws DecoderException
{
Assert.assertEquals( "oid.12.34.56 = azerty",
- LdapDN.parseDN( poolMgr, "oid.12.34.56 = azerty".getBytes() ).toString() );
+ LdapDN.parseDN( "oid.12.34.56 = azerty".getBytes() ).toString() );
}
/**
@@ -183,7 +158,7 @@
public void testLdapDNOidWithoutPrefix() throws DecoderException
{
Assert.assertEquals( "12.34.56 = azerty",
- LdapDN.parseDN( poolMgr, "12.34.56 = azerty".getBytes() ).toString() );
+ LdapDN.parseDN( "12.34.56 = azerty".getBytes() ).toString() );
}
/**
@@ -192,7 +167,7 @@
public void testLdapDNCompositeOidWithoutPrefix() throws DecoderException
{
Assert.assertEquals( "12.34.56 = azerty, 7.8 = test",
- LdapDN.parseDN( poolMgr, "12.34.56 = azerty; 7.8 = test".getBytes() ).toString() );
+ LdapDN.parseDN( "12.34.56 = azerty; 7.8 = test".getBytes() ).toString() );
}
/**
@@ -201,7 +176,7 @@
public void testLdapDNPairCharAttributeValue() throws DecoderException
{
Assert.assertEquals( "a = \\,\\=\\+\\<\\>\\#\\;\\\\\\\"\\A0\\00",
- LdapDN.parseDN( poolMgr, "a = \\,\\=\\+\\<\\>\\#\\;\\\\\\\"\\A0\\00".getBytes() ).toString() );
+ LdapDN.parseDN( "a = \\,\\=\\+\\<\\>\\#\\;\\\\\\\"\\A0\\00".getBytes() ).toString() );
}
/**
@@ -210,7 +185,7 @@
public void testLdapDNHexStringAttributeValue() throws DecoderException
{
Assert.assertEquals( "a = #0010A0AAFF",
- LdapDN.parseDN( poolMgr, "a = #0010A0AAFF".getBytes() ).toString() );
+ LdapDN.parseDN( "a = #0010A0AAFF".getBytes() ).toString() );
}
/**
@@ -219,6 +194,6 @@
public void testLdapDNQuotedAttributeValue() throws DecoderException
{
Assert.assertEquals( "a = quoted \\\"value",
- LdapDN.parseDN( poolMgr, "a = quoted \\\"value".getBytes() ).toString() );
+ LdapDN.parseDN( "a = quoted \\\"value".getBytes() ).toString() );
}
}