directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From fel...@apache.org
Subject svn commit: r955186 [3/3] - in /directory/apacheds/trunk: ./ core-annotations/ core-annotations/src/test/java/org/apache/directory/server/core/factory/ core-api/ core-api/src/test/java/org/apache/directory/server/core/changelog/ core-api/src/test/java/...
Date Wed, 16 Jun 2010 10:46:21 GMT
Modified: directory/apacheds/trunk/kerberos-shared/src/test/java/org/apache/directory/server/kerberos/shared/crypto/encryption/RandomKeyFactoryTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/kerberos-shared/src/test/java/org/apache/directory/server/kerberos/shared/crypto/encryption/RandomKeyFactoryTest.java?rev=955186&r1=955185&r2=955186&view=diff
==============================================================================
--- directory/apacheds/trunk/kerberos-shared/src/test/java/org/apache/directory/server/kerberos/shared/crypto/encryption/RandomKeyFactoryTest.java (original)
+++ directory/apacheds/trunk/kerberos-shared/src/test/java/org/apache/directory/server/kerberos/shared/crypto/encryption/RandomKeyFactoryTest.java Wed Jun 16 10:46:18 2010
@@ -28,8 +28,11 @@ import javax.crypto.KeyGenerator;
 import javax.crypto.SecretKey;
 import javax.crypto.spec.DESKeySpec;
 
+import org.apache.directory.junit.tools.Concurrent;
+import org.apache.directory.junit.tools.ConcurrentJunitRunner;
 import org.apache.directory.server.kerberos.shared.messages.value.EncryptionKey;
 import org.junit.Test;
+import org.junit.runner.RunWith;
 
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertTrue;
@@ -40,6 +43,8 @@ import static org.junit.Assert.assertTru
  * 
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
+@RunWith(ConcurrentJunitRunner.class)
+@Concurrent()
 public class RandomKeyFactoryTest
 {
     /**

Modified: directory/apacheds/trunk/kerberos-shared/src/test/java/org/apache/directory/server/kerberos/shared/keytab/KeytabTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/kerberos-shared/src/test/java/org/apache/directory/server/kerberos/shared/keytab/KeytabTest.java?rev=955186&r1=955185&r2=955186&view=diff
==============================================================================
--- directory/apacheds/trunk/kerberos-shared/src/test/java/org/apache/directory/server/kerberos/shared/keytab/KeytabTest.java (original)
+++ directory/apacheds/trunk/kerberos-shared/src/test/java/org/apache/directory/server/kerberos/shared/keytab/KeytabTest.java Wed Jun 16 10:46:18 2010
@@ -32,12 +32,16 @@ import java.util.TimeZone;
 
 import javax.crypto.spec.DESKeySpec;
 
+import org.apache.directory.junit.tools.Concurrent;
+import org.apache.directory.junit.tools.ConcurrentJunitRunner;
 import org.apache.directory.server.kerberos.shared.crypto.encryption.EncryptionType;
 import org.apache.directory.server.kerberos.shared.crypto.encryption.KerberosKeyFactory;
 import org.apache.directory.server.kerberos.shared.messages.value.EncryptionKey;
 import org.apache.directory.server.kerberos.shared.messages.value.KerberosTime;
 import org.apache.mina.core.buffer.IoBuffer;
 import org.junit.Test;
+import org.junit.runner.RunWith;
+
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertTrue;
 import static org.junit.Assert.fail;
@@ -50,6 +54,8 @@ import static org.junit.Assert.fail;
  *
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
+@RunWith(ConcurrentJunitRunner.class)
+@Concurrent()
 public class KeytabTest
 {
     private static final byte[] keytab1 = new byte[]

Modified: directory/apacheds/trunk/kerberos-shared/src/test/java/org/apache/directory/server/kerberos/shared/messages/components/TicketTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/kerberos-shared/src/test/java/org/apache/directory/server/kerberos/shared/messages/components/TicketTest.java?rev=955186&r1=955185&r2=955186&view=diff
==============================================================================
--- directory/apacheds/trunk/kerberos-shared/src/test/java/org/apache/directory/server/kerberos/shared/messages/components/TicketTest.java (original)
+++ directory/apacheds/trunk/kerberos-shared/src/test/java/org/apache/directory/server/kerberos/shared/messages/components/TicketTest.java Wed Jun 16 10:46:18 2010
@@ -27,17 +27,22 @@ import java.util.Arrays;
 
 import javax.security.auth.kerberos.KerberosPrincipal;
 
+import org.apache.directory.junit.tools.Concurrent;
+import org.apache.directory.junit.tools.ConcurrentJunitRunner;
 import org.apache.directory.server.kerberos.shared.io.encoder.TicketEncoder;
 import org.apache.directory.server.kerberos.shared.messages.value.EncryptionKey;
 import org.apache.directory.server.kerberos.shared.store.TicketFactory;
 import org.apache.directory.shared.ldap.util.StringTools;
 import org.junit.Test;
+import org.junit.runner.RunWith;
 
 /**
  * Test the Ticket encoding and decoding
  * 
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
+@RunWith(ConcurrentJunitRunner.class)
+@Concurrent()
 public class TicketTest
 {
     @Test

Modified: directory/apacheds/trunk/kerberos-shared/src/test/java/org/apache/directory/server/kerberos/shared/messages/value/AuthorizationDataTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/kerberos-shared/src/test/java/org/apache/directory/server/kerberos/shared/messages/value/AuthorizationDataTest.java?rev=955186&r1=955185&r2=955186&view=diff
==============================================================================
--- directory/apacheds/trunk/kerberos-shared/src/test/java/org/apache/directory/server/kerberos/shared/messages/value/AuthorizationDataTest.java (original)
+++ directory/apacheds/trunk/kerberos-shared/src/test/java/org/apache/directory/server/kerberos/shared/messages/value/AuthorizationDataTest.java Wed Jun 16 10:46:18 2010
@@ -23,8 +23,11 @@ package org.apache.directory.server.kerb
 import java.nio.ByteBuffer;
 import java.util.Arrays;
 
+import org.apache.directory.junit.tools.Concurrent;
+import org.apache.directory.junit.tools.ConcurrentJunitRunner;
 import org.apache.directory.server.kerberos.shared.messages.value.types.AuthorizationType;
 import org.junit.Test;
+import org.junit.runner.RunWith;
 
 import static org.junit.Assert.assertTrue;
 
@@ -33,6 +36,8 @@ import static org.junit.Assert.assertTru
  * 
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
+@RunWith(ConcurrentJunitRunner.class)
+@Concurrent()
 public class AuthorizationDataTest
 {
     @Test

Modified: directory/apacheds/trunk/kerberos-shared/src/test/java/org/apache/directory/server/kerberos/shared/messages/value/ChecksumTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/kerberos-shared/src/test/java/org/apache/directory/server/kerberos/shared/messages/value/ChecksumTest.java?rev=955186&r1=955185&r2=955186&view=diff
==============================================================================
--- directory/apacheds/trunk/kerberos-shared/src/test/java/org/apache/directory/server/kerberos/shared/messages/value/ChecksumTest.java (original)
+++ directory/apacheds/trunk/kerberos-shared/src/test/java/org/apache/directory/server/kerberos/shared/messages/value/ChecksumTest.java Wed Jun 16 10:46:18 2010
@@ -27,10 +27,13 @@ import static org.junit.Assert.assertTru
 import java.nio.ByteBuffer;
 import java.util.Arrays;
 
+import org.apache.directory.junit.tools.Concurrent;
+import org.apache.directory.junit.tools.ConcurrentJunitRunner;
 import org.apache.directory.server.kerberos.shared.crypto.checksum.ChecksumType;
-import org.junit.Before;
+import org.junit.BeforeClass;
 import org.junit.Ignore;
 import org.junit.Test;
+import org.junit.runner.RunWith;
 
 
 /**
@@ -38,32 +41,34 @@ import org.junit.Test;
  * 
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
+@RunWith(ConcurrentJunitRunner.class)
+@Concurrent()
 public class ChecksumTest
 {
-    Checksum checksumA;
-    Checksum checksumACopy;
-    Checksum checksumB;
-    Checksum checksumC;
-    Checksum checksumD;
+    private static Checksum checksumA;
+    private static Checksum checksumACopy;
+    private static Checksum checksumB;
+    private static Checksum checksumC;
+    private static Checksum checksumD;
 
-    byte[] checksumValueA = { ( byte ) 0x30, ( byte ) 0x1A, ( byte ) 0xA0, ( byte ) 0x11, ( byte ) 0x18, ( byte ) 0x0F, ( byte ) 0x32,
+    private static final byte[] CHECKSUM_VALUE_A = { ( byte ) 0x30, ( byte ) 0x1A, ( byte ) 0xA0, ( byte ) 0x11, ( byte ) 0x18, ( byte ) 0x0F, ( byte ) 0x32,
         ( byte ) 0x30 };
-    byte[] checksumValueB = { ( byte ) 0x30, ( byte ) 0x1A, ( byte ) 0xA0, ( byte ) 0x11, ( byte ) 0x18, ( byte ) 0x0F, ( byte ) 0x32,
+    private static final byte[] CHECKSUM_VALUE_B = { ( byte ) 0x30, ( byte ) 0x1A, ( byte ) 0xA0, ( byte ) 0x11, ( byte ) 0x18, ( byte ) 0x0F, ( byte ) 0x32,
         ( byte ) 0x30 };
-    byte[] checksumValueC = { ( byte ) 0x30, ( byte ) 0x1B, ( byte ) 0xA0, ( byte ) 0x11, ( byte ) 0x18, ( byte ) 0x0F, ( byte ) 0x32,
+    private static final byte[] CHECKSUM_VALUE_C = { ( byte ) 0x30, ( byte ) 0x1B, ( byte ) 0xA0, ( byte ) 0x11, ( byte ) 0x18, ( byte ) 0x0F, ( byte ) 0x32,
         ( byte ) 0x30 };
     
     /**
      * Initialize name instances
      */
-    @Before
-    public void initNames() throws Exception
+    @BeforeClass
+    public static void initNames() throws Exception
     {
-        checksumA = new Checksum ( ChecksumType.RSA_MD5, checksumValueA );
-        checksumACopy = new Checksum ( ChecksumType.RSA_MD5, checksumValueA );
-        checksumB = new Checksum ( ChecksumType.RSA_MD5, checksumValueB );
-        checksumC = new Checksum ( ChecksumType.RSA_MD5, checksumValueC );
-        checksumD = new Checksum ( ChecksumType.RSA_MD4, checksumValueA );
+        checksumA = new Checksum ( ChecksumType.RSA_MD5, CHECKSUM_VALUE_A );
+        checksumACopy = new Checksum ( ChecksumType.RSA_MD5, CHECKSUM_VALUE_A );
+        checksumB = new Checksum ( ChecksumType.RSA_MD5, CHECKSUM_VALUE_B );
+        checksumC = new Checksum ( ChecksumType.RSA_MD5, CHECKSUM_VALUE_C );
+        checksumD = new Checksum ( ChecksumType.RSA_MD4, CHECKSUM_VALUE_A );
 
     }
     

Modified: directory/apacheds/trunk/kerberos-shared/src/test/java/org/apache/directory/server/kerberos/shared/messages/value/EncryptedDataTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/kerberos-shared/src/test/java/org/apache/directory/server/kerberos/shared/messages/value/EncryptedDataTest.java?rev=955186&r1=955185&r2=955186&view=diff
==============================================================================
--- directory/apacheds/trunk/kerberos-shared/src/test/java/org/apache/directory/server/kerberos/shared/messages/value/EncryptedDataTest.java (original)
+++ directory/apacheds/trunk/kerberos-shared/src/test/java/org/apache/directory/server/kerberos/shared/messages/value/EncryptedDataTest.java Wed Jun 16 10:46:18 2010
@@ -23,9 +23,13 @@ package org.apache.directory.server.kerb
 import java.nio.ByteBuffer;
 import java.util.Arrays;
 
+import org.apache.directory.junit.tools.Concurrent;
+import org.apache.directory.junit.tools.ConcurrentJunitRunner;
 import org.apache.directory.server.kerberos.shared.crypto.encryption.EncryptionType;
 import org.apache.directory.shared.ldap.util.StringTools;
 import org.junit.Test;
+import org.junit.runner.RunWith;
+
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertTrue;
 
@@ -34,6 +38,8 @@ import static org.junit.Assert.assertTru
  * 
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
+@RunWith(ConcurrentJunitRunner.class)
+@Concurrent()
 public class EncryptedDataTest
 {
     @Test

Modified: directory/apacheds/trunk/kerberos-shared/src/test/java/org/apache/directory/server/kerberos/shared/messages/value/EncryptionKeyTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/kerberos-shared/src/test/java/org/apache/directory/server/kerberos/shared/messages/value/EncryptionKeyTest.java?rev=955186&r1=955185&r2=955186&view=diff
==============================================================================
--- directory/apacheds/trunk/kerberos-shared/src/test/java/org/apache/directory/server/kerberos/shared/messages/value/EncryptionKeyTest.java (original)
+++ directory/apacheds/trunk/kerberos-shared/src/test/java/org/apache/directory/server/kerberos/shared/messages/value/EncryptionKeyTest.java Wed Jun 16 10:46:18 2010
@@ -20,50 +20,55 @@
 package org.apache.directory.server.kerberos.shared.messages.value;
 
 
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertTrue;
+
 import java.io.IOException;
 import java.nio.ByteBuffer;
 import java.util.Arrays;
 
+import org.apache.directory.junit.tools.Concurrent;
+import org.apache.directory.junit.tools.ConcurrentJunitRunner;
 import org.apache.directory.server.kerberos.shared.crypto.encryption.EncryptionType;
 import org.apache.directory.server.kerberos.shared.io.encoder.EncryptionKeyEncoder;
 import org.apache.directory.shared.asn1.codec.EncoderException;
-import org.junit.Before;
+import org.junit.BeforeClass;
 import org.junit.Ignore;
 import org.junit.Test;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertTrue;
+import org.junit.runner.RunWith;
 
 /**
  * Test the EncryptionKey encoding and decoding
  * 
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
+@RunWith(ConcurrentJunitRunner.class)
+@Concurrent()
 public class EncryptionKeyTest
 {
-    EncryptionKey encryptionA;
-    EncryptionKey encryptionACopy;
-    EncryptionKey encryptionB;
-    EncryptionKey encryptionC;
-    EncryptionKey encryptionD;
-
-    byte[] encryptionValueA = { 0x01, 0x02, 0x03 };
-    byte[] encryptionValueB = { 0x01, 0x02, 0x03 };
-    byte[] encryptionValueC = { 0x01, 0x02, 0x04 };
+    private static EncryptionKey encryptionA;
+    private static EncryptionKey encryptionACopy;
+    private static EncryptionKey encryptionB;
+    private static EncryptionKey encryptionC;
+    private static EncryptionKey encryptionD;
+
+    private static final byte[] ENCRYPTION_VALUE_A = { 0x01, 0x02, 0x03 };
+    private static final byte[] ENCRYPTION_VALUE_B = { 0x01, 0x02, 0x03 };
+    private static final byte[] ENCRYPTION_VALUE_C = { 0x01, 0x02, 0x04 };
 
     
     /**
      * Initialize name instances
      */
-    @Before
-    public void initNames() throws Exception
+    @BeforeClass
+    public static void initNames() throws Exception
     {
-        encryptionA = new EncryptionKey ( EncryptionType.AES128_CTS_HMAC_SHA1_96, encryptionValueA );
-        encryptionACopy = new EncryptionKey ( EncryptionType.AES128_CTS_HMAC_SHA1_96, encryptionValueA );
-        encryptionB = new EncryptionKey ( EncryptionType.AES128_CTS_HMAC_SHA1_96, encryptionValueB );
-        encryptionC = new EncryptionKey ( EncryptionType.AES128_CTS_HMAC_SHA1_96, encryptionValueC );
-        encryptionD = new EncryptionKey ( EncryptionType.AES256_CTS_HMAC_SHA1_96, encryptionValueA );
+        encryptionA = new EncryptionKey ( EncryptionType.AES128_CTS_HMAC_SHA1_96, ENCRYPTION_VALUE_A );
+        encryptionACopy = new EncryptionKey ( EncryptionType.AES128_CTS_HMAC_SHA1_96, ENCRYPTION_VALUE_A );
+        encryptionB = new EncryptionKey ( EncryptionType.AES128_CTS_HMAC_SHA1_96, ENCRYPTION_VALUE_B );
+        encryptionC = new EncryptionKey ( EncryptionType.AES128_CTS_HMAC_SHA1_96, ENCRYPTION_VALUE_C );
+        encryptionD = new EncryptionKey ( EncryptionType.AES256_CTS_HMAC_SHA1_96, ENCRYPTION_VALUE_A );
 
     }
 
@@ -161,14 +166,14 @@ public class EncryptionKeyTest
             { 0x01, 0x02, 0x03 } );
         EncryptionKeyEncoder.encode( ec );
 
-        long t0 = System.currentTimeMillis();
+        // long t0 = System.currentTimeMillis();
 
         //for ( int i = 0; i < 10000000; i++ )
         {
             EncryptionKeyEncoder.encode( ec );
         }
 
-        long t1 = System.currentTimeMillis();
+        // long t1 = System.currentTimeMillis();
 
         //System.out.println( "Delta = " + ( t1 - t0 ) );
     }
@@ -182,7 +187,7 @@ public class EncryptionKeyTest
         ByteBuffer encoded = ByteBuffer.allocate( ec.computeLength() );
         ec.encode( encoded );
 
-        long t0 = System.currentTimeMillis();
+        // long t0 = System.currentTimeMillis();
 
         //for ( int i = 0; i < 40000000; i++ )
         {
@@ -191,7 +196,7 @@ public class EncryptionKeyTest
             ec.encode( encoded );
         }
 
-        long t1 = System.currentTimeMillis();
+        // long t1 = System.currentTimeMillis();
 
         //System.out.println( "Delta2 = " + ( t1 - t0 ) );
     }

Modified: directory/apacheds/trunk/kerberos-shared/src/test/java/org/apache/directory/server/kerberos/shared/messages/value/HostAddressTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/kerberos-shared/src/test/java/org/apache/directory/server/kerberos/shared/messages/value/HostAddressTest.java?rev=955186&r1=955185&r2=955186&view=diff
==============================================================================
--- directory/apacheds/trunk/kerberos-shared/src/test/java/org/apache/directory/server/kerberos/shared/messages/value/HostAddressTest.java (original)
+++ directory/apacheds/trunk/kerberos-shared/src/test/java/org/apache/directory/server/kerberos/shared/messages/value/HostAddressTest.java Wed Jun 16 10:46:18 2010
@@ -27,30 +27,35 @@ import static org.junit.Assert.assertTru
 import java.nio.ByteBuffer;
 import java.util.Arrays;
 
+import org.apache.directory.junit.tools.Concurrent;
+import org.apache.directory.junit.tools.ConcurrentJunitRunner;
 import org.apache.directory.server.kerberos.shared.messages.value.types.HostAddrType;
-import org.junit.Before;
+import org.junit.BeforeClass;
 import org.junit.Ignore;
 import org.junit.Test;
+import org.junit.runner.RunWith;
 
 /**
  * Test the HostAddress encoding and decoding
  * 
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
+@RunWith(ConcurrentJunitRunner.class)
+@Concurrent()
 public class HostAddressTest
 {
-    HostAddress hostAddressA;
-    HostAddress hostAddressACopy;
-    HostAddress hostAddressB;
-    HostAddress hostAddressC;
-    HostAddress hostAddressD;
+    private static HostAddress hostAddressA;
+    private static HostAddress hostAddressACopy;
+    private static HostAddress hostAddressB;
+    private static HostAddress hostAddressC;
+    private static HostAddress hostAddressD;
 
     
     /**
      * Initialize name instances
      */
-    @Before
-    public void initNames() throws Exception
+    @BeforeClass
+    public static void initNames() throws Exception
     {
         hostAddressA = new HostAddress( HostAddrType.ADDRTYPE_INET, new byte[]
                                                                             { 0x01, 0x02, 0x03, 0x04 } );

Modified: directory/apacheds/trunk/kerberos-shared/src/test/java/org/apache/directory/server/kerberos/shared/messages/value/HostAddressesTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/kerberos-shared/src/test/java/org/apache/directory/server/kerberos/shared/messages/value/HostAddressesTest.java?rev=955186&r1=955185&r2=955186&view=diff
==============================================================================
--- directory/apacheds/trunk/kerberos-shared/src/test/java/org/apache/directory/server/kerberos/shared/messages/value/HostAddressesTest.java (original)
+++ directory/apacheds/trunk/kerberos-shared/src/test/java/org/apache/directory/server/kerberos/shared/messages/value/HostAddressesTest.java Wed Jun 16 10:46:18 2010
@@ -23,34 +23,38 @@ package org.apache.directory.server.kerb
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertFalse;
 import static org.junit.Assert.assertTrue;
-import static org.junit.Assert.fail;
 
 import java.nio.ByteBuffer;
 import java.util.Arrays;
 
+import org.apache.directory.junit.tools.Concurrent;
+import org.apache.directory.junit.tools.ConcurrentJunitRunner;
 import org.apache.directory.server.kerberos.shared.messages.value.types.HostAddrType;
-import org.junit.Before;
+import org.junit.BeforeClass;
 import org.junit.Test;
+import org.junit.runner.RunWith;
 
 /**
  * Test the HostAddresses encoding and decoding
  * 
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
+@RunWith(ConcurrentJunitRunner.class)
+@Concurrent()
 public class HostAddressesTest
 {
-    HostAddresses hostAddressesA;
-    HostAddresses hostAddressesACopy;
-    HostAddresses hostAddressesB;
-    HostAddresses hostAddressesC;
-    HostAddresses hostAddressesD;
+    private static HostAddresses hostAddressesA;
+    private static HostAddresses hostAddressesACopy;
+    private static HostAddresses hostAddressesB;
+    private static HostAddresses hostAddressesC;
+    private static HostAddresses hostAddressesD;
 
     
     /**
      * Initialize name instances
      */
-    @Before
-    public void initNames() throws Exception
+    @BeforeClass
+    public static void initNames() throws Exception
     {
         hostAddressesA = new HostAddresses ( new HostAddress[]
             { new HostAddress( HostAddrType.ADDRTYPE_INET, new byte[]

Modified: directory/apacheds/trunk/kerberos-shared/src/test/java/org/apache/directory/server/kerberos/shared/messages/value/PaDataTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/kerberos-shared/src/test/java/org/apache/directory/server/kerberos/shared/messages/value/PaDataTest.java?rev=955186&r1=955185&r2=955186&view=diff
==============================================================================
--- directory/apacheds/trunk/kerberos-shared/src/test/java/org/apache/directory/server/kerberos/shared/messages/value/PaDataTest.java (original)
+++ directory/apacheds/trunk/kerberos-shared/src/test/java/org/apache/directory/server/kerberos/shared/messages/value/PaDataTest.java Wed Jun 16 10:46:18 2010
@@ -23,8 +23,12 @@ package org.apache.directory.server.kerb
 import java.nio.ByteBuffer;
 import java.util.Arrays;
 
+import org.apache.directory.junit.tools.Concurrent;
+import org.apache.directory.junit.tools.ConcurrentJunitRunner;
 import org.apache.directory.server.kerberos.shared.messages.value.types.PaDataType;
 import org.junit.Test;
+import org.junit.runner.RunWith;
+
 import static org.junit.Assert.assertTrue;
 
 /**
@@ -32,6 +36,8 @@ import static org.junit.Assert.assertTru
  * 
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
+@RunWith(ConcurrentJunitRunner.class)
+@Concurrent()
 public class PaDataTest
 {
     @Test

Modified: directory/apacheds/trunk/kerberos-shared/src/test/java/org/apache/directory/server/kerberos/shared/messages/value/PrincipalNameTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/kerberos-shared/src/test/java/org/apache/directory/server/kerberos/shared/messages/value/PrincipalNameTest.java?rev=955186&r1=955185&r2=955186&view=diff
==============================================================================
--- directory/apacheds/trunk/kerberos-shared/src/test/java/org/apache/directory/server/kerberos/shared/messages/value/PrincipalNameTest.java (original)
+++ directory/apacheds/trunk/kerberos-shared/src/test/java/org/apache/directory/server/kerberos/shared/messages/value/PrincipalNameTest.java Wed Jun 16 10:46:18 2010
@@ -22,9 +22,13 @@ package org.apache.directory.server.kerb
 
 import java.nio.ByteBuffer;
 
+import org.apache.directory.junit.tools.Concurrent;
+import org.apache.directory.junit.tools.ConcurrentJunitRunner;
 import org.apache.directory.server.kerberos.shared.messages.value.types.PrincipalNameType;
 import org.apache.directory.shared.ldap.util.StringTools;
 import org.junit.Test;
+import org.junit.runner.RunWith;
+
 import static org.junit.Assert.assertEquals;
 
 /**
@@ -32,6 +36,8 @@ import static org.junit.Assert.assertEqu
  * 
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
+@RunWith(ConcurrentJunitRunner.class)
+@Concurrent()
 public class PrincipalNameTest
 {
     @Test

Modified: directory/apacheds/trunk/kerberos-shared/src/test/java/org/apache/directory/server/kerberos/shared/messages/value/TransitedEncodingTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/kerberos-shared/src/test/java/org/apache/directory/server/kerberos/shared/messages/value/TransitedEncodingTest.java?rev=955186&r1=955185&r2=955186&view=diff
==============================================================================
--- directory/apacheds/trunk/kerberos-shared/src/test/java/org/apache/directory/server/kerberos/shared/messages/value/TransitedEncodingTest.java (original)
+++ directory/apacheds/trunk/kerberos-shared/src/test/java/org/apache/directory/server/kerberos/shared/messages/value/TransitedEncodingTest.java Wed Jun 16 10:46:18 2010
@@ -23,8 +23,12 @@ package org.apache.directory.server.kerb
 import java.nio.ByteBuffer;
 import java.util.Arrays;
 
+import org.apache.directory.junit.tools.Concurrent;
+import org.apache.directory.junit.tools.ConcurrentJunitRunner;
 import org.apache.directory.server.kerberos.shared.messages.value.types.TransitedEncodingType;
 import org.junit.Test;
+import org.junit.runner.RunWith;
+
 import static org.junit.Assert.assertTrue;
 
 /**
@@ -32,6 +36,8 @@ import static org.junit.Assert.assertTru
  * 
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
+@RunWith(ConcurrentJunitRunner.class)
+@Concurrent()
 public class TransitedEncodingTest
 {
     @Test

Modified: directory/apacheds/trunk/kerberos-shared/src/test/java/org/apache/directory/server/kerberos/shared/replay/InMemoryReplayCacheTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/kerberos-shared/src/test/java/org/apache/directory/server/kerberos/shared/replay/InMemoryReplayCacheTest.java?rev=955186&r1=955185&r2=955186&view=diff
==============================================================================
--- directory/apacheds/trunk/kerberos-shared/src/test/java/org/apache/directory/server/kerberos/shared/replay/InMemoryReplayCacheTest.java (original)
+++ directory/apacheds/trunk/kerberos-shared/src/test/java/org/apache/directory/server/kerberos/shared/replay/InMemoryReplayCacheTest.java Wed Jun 16 10:46:18 2010
@@ -26,10 +26,13 @@ import java.util.Map;
 
 import javax.security.auth.kerberos.KerberosPrincipal;
 
+import org.apache.directory.junit.tools.Concurrent;
+import org.apache.directory.junit.tools.ConcurrentJunitRunner;
 import org.apache.directory.server.kerberos.shared.messages.value.KerberosTime;
 import org.apache.directory.server.kerberos.shared.messages.value.types.PrincipalNameType;
 import org.apache.directory.server.kerberos.shared.replay.InMemoryReplayCache.ReplayCacheEntry;
 import org.junit.Test;
+import org.junit.runner.RunWith;
 
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertNotNull;
@@ -39,6 +42,8 @@ import static org.junit.Assert.assertNot
  * 
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
+@RunWith(ConcurrentJunitRunner.class)
+@Concurrent()
 public class InMemoryReplayCacheTest
 {
     /**

Modified: directory/apacheds/trunk/ldap-client-test/src/test/java/org/apache/directory/shared/client/api/LdapConnectionTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/ldap-client-test/src/test/java/org/apache/directory/shared/client/api/LdapConnectionTest.java?rev=955186&r1=955185&r2=955186&view=diff
==============================================================================
--- directory/apacheds/trunk/ldap-client-test/src/test/java/org/apache/directory/shared/client/api/LdapConnectionTest.java (original)
+++ directory/apacheds/trunk/ldap-client-test/src/test/java/org/apache/directory/shared/client/api/LdapConnectionTest.java Wed Jun 16 10:46:18 2010
@@ -47,8 +47,8 @@ import org.apache.directory.shared.ldap.
 import org.apache.directory.shared.ldap.filter.EqualityNode;
 import org.apache.directory.shared.ldap.filter.SearchScope;
 import org.apache.directory.shared.ldap.schema.SchemaManager;
-import org.junit.After;
-import org.junit.Before;
+import org.junit.AfterClass;
+import org.junit.BeforeClass;
 import org.junit.Test;
 import org.junit.runner.RunWith;
 
@@ -69,19 +69,19 @@ public class LdapConnectionTest extends 
     
     private static final String ADMIN_DN = "uid=admin,ou=system";
 
-    private LdapConnection connection;
+    private static LdapConnection connection;
     
     
-    @Before
-    public void bindConnection() throws Exception
+    @BeforeClass
+    public static void bindConnection() throws Exception
     {
         connection = new LdapNetworkConnection( "localhost", ldapServer.getPort() );
         connection.bind( ADMIN_DN, "secret" );
     }
     
     
-    @After
-    public void unbindConnection() throws Exception
+    @AfterClass
+    public static void unbindConnection() throws Exception
     {
         connection.close();
     }

Modified: directory/apacheds/trunk/ldap-client-test/src/test/java/org/apache/directory/shared/client/api/LdapSSLConnectionTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/ldap-client-test/src/test/java/org/apache/directory/shared/client/api/LdapSSLConnectionTest.java?rev=955186&r1=955185&r2=955186&view=diff
==============================================================================
--- directory/apacheds/trunk/ldap-client-test/src/test/java/org/apache/directory/shared/client/api/LdapSSLConnectionTest.java (original)
+++ directory/apacheds/trunk/ldap-client-test/src/test/java/org/apache/directory/shared/client/api/LdapSSLConnectionTest.java Wed Jun 16 10:46:18 2010
@@ -31,9 +31,9 @@ import java.util.List;
 import javax.net.ssl.TrustManager;
 import javax.net.ssl.X509TrustManager;
 
-import org.apache.directory.ldap.client.api.LdapNetworkConnection;
 import org.apache.directory.ldap.client.api.LdapConnection;
 import org.apache.directory.ldap.client.api.LdapConnectionConfig;
+import org.apache.directory.ldap.client.api.LdapNetworkConnection;
 import org.apache.directory.ldap.client.api.message.BindResponse;
 import org.apache.directory.server.annotations.CreateLdapServer;
 import org.apache.directory.server.annotations.CreateTransport;
@@ -48,7 +48,7 @@ import org.apache.directory.server.ldap.
 import org.apache.directory.server.ldap.handlers.extended.StoredProcedureExtendedOperationHandler;
 import org.apache.directory.shared.ldap.constants.SupportedSaslMechanisms;
 import org.apache.directory.shared.ldap.name.DN;
-import org.junit.Before;
+import org.junit.BeforeClass;
 import org.junit.Test;
 import org.junit.runner.RunWith;
 
@@ -80,11 +80,11 @@ import org.junit.runner.RunWith;
     })
 public class LdapSSLConnectionTest extends AbstractLdapTestUnit
 {
-    private LdapConnectionConfig config;
+    private static LdapConnectionConfig config;
     
     
-    @Before
-    public void setup()
+    @BeforeClass
+    public static void setup()
     {
         X509TrustManager X509 = new X509TrustManager()
         {

Modified: directory/apacheds/trunk/ldap-client-test/src/test/java/org/apache/directory/shared/client/api/operations/ClientAbandonRequestTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/ldap-client-test/src/test/java/org/apache/directory/shared/client/api/operations/ClientAbandonRequestTest.java?rev=955186&r1=955185&r2=955186&view=diff
==============================================================================
--- directory/apacheds/trunk/ldap-client-test/src/test/java/org/apache/directory/shared/client/api/operations/ClientAbandonRequestTest.java (original)
+++ directory/apacheds/trunk/ldap-client-test/src/test/java/org/apache/directory/shared/client/api/operations/ClientAbandonRequestTest.java Wed Jun 16 10:46:18 2010
@@ -76,7 +76,7 @@ public class ClientAbandonRequestTest ex
         connection.setTimeOut( 0L );
         connection.bind( bindDn.getName(), "secret" );
 
-        session = ldapServer.getDirectoryService().getSession();
+//        session = ldapServer.getDirectoryService().getSession();
     }
     
     

Modified: directory/apacheds/trunk/ldap-client-test/src/test/java/org/apache/directory/shared/client/api/operations/ClientModifyRequestTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/ldap-client-test/src/test/java/org/apache/directory/shared/client/api/operations/ClientModifyRequestTest.java?rev=955186&r1=955185&r2=955186&view=diff
==============================================================================
--- directory/apacheds/trunk/ldap-client-test/src/test/java/org/apache/directory/shared/client/api/operations/ClientModifyRequestTest.java (original)
+++ directory/apacheds/trunk/ldap-client-test/src/test/java/org/apache/directory/shared/client/api/operations/ClientModifyRequestTest.java Wed Jun 16 10:46:18 2010
@@ -38,7 +38,6 @@ import org.apache.directory.ldap.client.
 import org.apache.directory.server.annotations.CreateLdapServer;
 import org.apache.directory.server.annotations.CreateTransport;
 import org.apache.directory.server.core.CoreSession;
-import org.apache.directory.server.core.annotations.ApplyLdifs;
 import org.apache.directory.server.core.integ.AbstractLdapTestUnit;
 import org.apache.directory.server.core.integ.FrameworkRunner;
 import org.apache.directory.shared.ldap.constants.SchemaConstants;

Modified: directory/apacheds/trunk/ldap-client-test/src/test/java/org/apache/directory/shared/client/api/operations/search/ClientSearchRequestTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/ldap-client-test/src/test/java/org/apache/directory/shared/client/api/operations/search/ClientSearchRequestTest.java?rev=955186&r1=955185&r2=955186&view=diff
==============================================================================
--- directory/apacheds/trunk/ldap-client-test/src/test/java/org/apache/directory/shared/client/api/operations/search/ClientSearchRequestTest.java (original)
+++ directory/apacheds/trunk/ldap-client-test/src/test/java/org/apache/directory/shared/client/api/operations/search/ClientSearchRequestTest.java Wed Jun 16 10:46:18 2010
@@ -44,8 +44,8 @@ import org.apache.directory.shared.ldap.
 import org.apache.directory.shared.ldap.filter.SearchScope;
 import org.apache.directory.shared.ldap.message.AliasDerefMode;
 import org.apache.directory.shared.ldap.name.DN;
-import org.junit.After;
-import org.junit.Before;
+import org.junit.AfterClass;
+import org.junit.BeforeClass;
 import org.junit.Test;
 import org.junit.runner.RunWith;
 
@@ -79,10 +79,10 @@ import org.junit.runner.RunWith;
 })
 public class ClientSearchRequestTest extends AbstractLdapTestUnit
 {
-    private LdapAsyncConnection connection;
+    private static LdapAsyncConnection connection;
 
-    @Before
-    public void setup() throws Exception
+    @BeforeClass
+    public static void setup() throws Exception
     {
         connection = new LdapNetworkConnection( "localhost", ldapServer.getPort() );
         DN bindDn = new DN( "uid=admin,ou=system" );
@@ -93,8 +93,8 @@ public class ClientSearchRequestTest ext
     /**
      * Close the LdapConnection
      */
-    @After
-    public void shutdown()
+    @AfterClass
+    public static void shutdown()
     {
         try
         {

Modified: directory/apacheds/trunk/ldap-client-test/src/test/java/org/apache/directory/shared/client/api/operations/search/SearchRequestReturningAttributesTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/ldap-client-test/src/test/java/org/apache/directory/shared/client/api/operations/search/SearchRequestReturningAttributesTest.java?rev=955186&r1=955185&r2=955186&view=diff
==============================================================================
--- directory/apacheds/trunk/ldap-client-test/src/test/java/org/apache/directory/shared/client/api/operations/search/SearchRequestReturningAttributesTest.java (original)
+++ directory/apacheds/trunk/ldap-client-test/src/test/java/org/apache/directory/shared/client/api/operations/search/SearchRequestReturningAttributesTest.java Wed Jun 16 10:46:18 2010
@@ -26,8 +26,8 @@ import static org.junit.Assert.assertNot
 import static org.junit.Assert.assertTrue;
 import static org.junit.Assert.fail;
 
-import org.apache.directory.ldap.client.api.LdapNetworkConnection;
 import org.apache.directory.ldap.client.api.LdapConnection;
+import org.apache.directory.ldap.client.api.LdapNetworkConnection;
 import org.apache.directory.ldap.client.api.message.SearchResponse;
 import org.apache.directory.ldap.client.api.message.SearchResultEntry;
 import org.apache.directory.server.annotations.CreateLdapServer;
@@ -39,8 +39,8 @@ import org.apache.directory.shared.ldap.
 import org.apache.directory.shared.ldap.entry.Entry;
 import org.apache.directory.shared.ldap.filter.SearchScope;
 import org.apache.directory.shared.ldap.name.DN;
-import org.junit.After;
-import org.junit.Before;
+import org.junit.AfterClass;
+import org.junit.BeforeClass;
 import org.junit.Test;
 import org.junit.runner.RunWith;
 
@@ -74,10 +74,10 @@ import org.junit.runner.RunWith;
 })
 public class SearchRequestReturningAttributesTest extends AbstractLdapTestUnit
 {
-    private LdapConnection connection;
+    private static LdapConnection connection;
 
-    @Before
-    public void setup() throws Exception
+    @BeforeClass
+    public static void setup() throws Exception
     {
         connection = new LdapNetworkConnection( "localhost", ldapServer.getPort() );
         DN bindDn = new DN( "uid=admin,ou=system" );
@@ -88,8 +88,8 @@ public class SearchRequestReturningAttri
     /**
      * Close the LdapConnection
      */
-    @After
-    public void shutdown()
+    @AfterClass
+    public static void shutdown()
     {
         try
         {

Modified: directory/apacheds/trunk/pom.xml
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/pom.xml?rev=955186&r1=955185&r2=955186&view=diff
==============================================================================
--- directory/apacheds/trunk/pom.xml (original)
+++ directory/apacheds/trunk/pom.xml Wed Jun 16 10:46:18 2010
@@ -42,6 +42,7 @@
     <org.apache.directory.ldap.client.api.version>0.2-SNAPSHOT</org.apache.directory.ldap.client.api.version>
     <org.apache.directory.daemon.version>1.1.9-SNAPSHOT</org.apache.directory.daemon.version>
     <org.apache.directory.buildtools.directory-checkstyle.version>0.1-SNAPSHOT</org.apache.directory.buildtools.directory-checkstyle.version>
+    <org.apache.directory.junit.junit-addons.version>0.1-SNAPSHOT</org.apache.directory.junit.junit-addons.version>
     <skin.version>1.0.1</skin.version>
     
     <!-- Set versions for depending jars -->
@@ -555,6 +556,14 @@
         <version>${commons.pool.version}</version>
       </dependency>
 
+      <!-- Test dependencies -->
+
+      <dependency>
+        <groupId>org.apache.directory.junit</groupId>
+        <artifactId>junit-addons</artifactId>
+        <version>${org.apache.directory.junit.junit-addons.version}</version>
+      </dependency>
+
       <!-- Logging dependencies -->
 
       <dependency>

Modified: directory/apacheds/trunk/protocol-changepw/pom.xml
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/protocol-changepw/pom.xml?rev=955186&r1=955185&r2=955186&view=diff
==============================================================================
--- directory/apacheds/trunk/protocol-changepw/pom.xml (original)
+++ directory/apacheds/trunk/protocol-changepw/pom.xml Wed Jun 16 10:46:18 2010
@@ -32,6 +32,12 @@
 
   <dependencies>
     <dependency>
+      <groupId>org.apache.directory.junit</groupId>
+      <artifactId>junit-addons</artifactId>
+      <scope>test</scope>
+    </dependency>
+
+    <dependency>
       <groupId>${project.groupId}</groupId>
       <artifactId>apacheds-core-api</artifactId>
     </dependency>

Modified: directory/apacheds/trunk/protocol-changepw/src/test/java/org/apache/directory/server/changepw/protocol/ChangepwProtocolHandlerTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/protocol-changepw/src/test/java/org/apache/directory/server/changepw/protocol/ChangepwProtocolHandlerTest.java?rev=955186&r1=955185&r2=955186&view=diff
==============================================================================
--- directory/apacheds/trunk/protocol-changepw/src/test/java/org/apache/directory/server/changepw/protocol/ChangepwProtocolHandlerTest.java (original)
+++ directory/apacheds/trunk/protocol-changepw/src/test/java/org/apache/directory/server/changepw/protocol/ChangepwProtocolHandlerTest.java Wed Jun 16 10:46:18 2010
@@ -29,6 +29,8 @@ import java.net.UnknownHostException;
 
 import javax.security.auth.kerberos.KerberosPrincipal;
 
+import org.apache.directory.junit.tools.Concurrent;
+import org.apache.directory.junit.tools.ConcurrentJunitRunner;
 import org.apache.directory.server.changepw.ChangePasswordServer;
 import org.apache.directory.server.changepw.io.ChangePasswordDataEncoder;
 import org.apache.directory.server.changepw.messages.ChangePasswordError;
@@ -59,7 +61,10 @@ import org.apache.directory.server.kerbe
 import org.apache.directory.server.kerberos.shared.store.TicketFactory;
 import org.apache.mina.core.future.WriteFuture;
 import org.apache.mina.core.session.DummySession;
+import org.junit.BeforeClass;
 import org.junit.Test;
+import org.junit.runner.RunWith;
+
 import static org.junit.Assert.assertEquals;
 
 /**
@@ -67,6 +72,8 @@ import static org.junit.Assert.assertEqu
  *
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
+@RunWith(ConcurrentJunitRunner.class)
+@Concurrent()
 public class ChangepwProtocolHandlerTest
 {
     /**
@@ -76,23 +83,22 @@ public class ChangepwProtocolHandlerTest
     //private static final byte[] SUCCESS = new byte[]
     //    { ( byte ) 0x00, ( byte ) 0x00 };
 
-    private ChangePasswordServer config;
-    private PrincipalStore store;
-    private ChangePasswordProtocolHandler handler;
-    private ChPwdDummySession session;
+    private static ChangePasswordServer config;
+    private static PrincipalStore store;
+    private static ChangePasswordProtocolHandler handler;
 
-    private CipherTextHandler cipherTextHandler = new CipherTextHandler();
+    private static final CipherTextHandler cipherTextHandler = new CipherTextHandler();
 
 
     /**
      * Creates a new instance of ChangepwProtocolHandlerTest.
      */
-    public ChangepwProtocolHandlerTest()
+    @BeforeClass
+    public static void setup()
     {
         config = new ChangePasswordServer();
         store = new MapPrincipalStoreImpl();
         handler = new ChangePasswordProtocolHandler( config, store );
-        session = new ChPwdDummySession();
     }
 
 
@@ -102,6 +108,7 @@ public class ChangepwProtocolHandlerTest
     @Test
     public void testProtocolVersionNumber()
     {
+        ChPwdDummySession session = new ChPwdDummySession();
         ChangePasswordRequest message = new ChangePasswordRequest( ( short ) 2, null, null );
 
         handler.messageReceived( session, message );
@@ -119,6 +126,7 @@ public class ChangepwProtocolHandlerTest
     @Test
     public void testMissingTicket()
     {
+        ChPwdDummySession session = new ChPwdDummySession();
         ChangePasswordRequest message = new ChangePasswordRequest( ( short ) 1, null, null );
 
         handler.messageReceived( session, message );
@@ -138,6 +146,7 @@ public class ChangepwProtocolHandlerTest
     @Test
     public void testInitialFlagRequired() throws Exception
     {
+        ChPwdDummySession session = new ChPwdDummySession();
         KerberosPrincipal clientPrincipal = new KerberosPrincipal( "hnelson@EXAMPLE.COM" );
 
         KerberosPrincipal serverPrincipal = new KerberosPrincipal( "kadmin/changepw@EXAMPLE.COM" );
@@ -215,6 +224,7 @@ public class ChangepwProtocolHandlerTest
     @Test
     public void testSetPassword() throws Exception
     {
+        ChPwdDummySession session = new ChPwdDummySession();
         KerberosPrincipal clientPrincipal = new KerberosPrincipal( "hnelson@EXAMPLE.COM" );
 
         KerberosPrincipal serverPrincipal = new KerberosPrincipal( "kadmin/changepw@EXAMPLE.COM" );

Modified: directory/apacheds/trunk/protocol-changepw/src/test/java/org/apache/directory/server/changepw/service/CheckPasswordPolicyTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/protocol-changepw/src/test/java/org/apache/directory/server/changepw/service/CheckPasswordPolicyTest.java?rev=955186&r1=955185&r2=955186&view=diff
==============================================================================
--- directory/apacheds/trunk/protocol-changepw/src/test/java/org/apache/directory/server/changepw/service/CheckPasswordPolicyTest.java (original)
+++ directory/apacheds/trunk/protocol-changepw/src/test/java/org/apache/directory/server/changepw/service/CheckPasswordPolicyTest.java Wed Jun 16 10:46:18 2010
@@ -22,7 +22,11 @@ package org.apache.directory.server.chan
 
 import javax.security.auth.kerberos.KerberosPrincipal;
 
+import org.apache.directory.junit.tools.Concurrent;
+import org.apache.directory.junit.tools.ConcurrentJunitRunner;
 import org.junit.Test;
+import org.junit.runner.RunWith;
+
 import static org.junit.Assert.assertTrue;
 import static org.junit.Assert.assertFalse;
 
@@ -31,13 +35,15 @@ import static org.junit.Assert.assertFal
  * 
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
+@RunWith(ConcurrentJunitRunner.class)
+@Concurrent()
 public class CheckPasswordPolicyTest
 {
-    private int passwordLength = 6;
-    private int categoryCount = 3;
-    private int tokenSize = 3;
+    private static final int passwordLength = 6;
+    private static final int categoryCount = 3;
+    private static final int tokenSize = 3;
 
-    private CheckPasswordPolicy policy = new CheckPasswordPolicy();
+    private static final CheckPasswordPolicy policy = new CheckPasswordPolicy();
 
 
     /**

Modified: directory/apacheds/trunk/protocol-dhcp/pom.xml
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/protocol-dhcp/pom.xml?rev=955186&r1=955185&r2=955186&view=diff
==============================================================================
--- directory/apacheds/trunk/protocol-dhcp/pom.xml (original)
+++ directory/apacheds/trunk/protocol-dhcp/pom.xml Wed Jun 16 10:46:18 2010
@@ -32,6 +32,12 @@
 
   <dependencies>
     <dependency>
+      <groupId>org.apache.directory.junit</groupId>
+      <artifactId>junit-addons</artifactId>
+      <scope>test</scope>
+    </dependency>
+
+    <dependency>
       <groupId>${project.groupId}</groupId>
       <artifactId>apacheds-i18n</artifactId>
     </dependency>

Modified: directory/apacheds/trunk/protocol-dhcp/src/test/java/org/apache/directory/server/dhcp/DhcpMessageDecoderTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/protocol-dhcp/src/test/java/org/apache/directory/server/dhcp/DhcpMessageDecoderTest.java?rev=955186&r1=955185&r2=955186&view=diff
==============================================================================
--- directory/apacheds/trunk/protocol-dhcp/src/test/java/org/apache/directory/server/dhcp/DhcpMessageDecoderTest.java (original)
+++ directory/apacheds/trunk/protocol-dhcp/src/test/java/org/apache/directory/server/dhcp/DhcpMessageDecoderTest.java Wed Jun 16 10:46:18 2010
@@ -23,14 +23,19 @@ package org.apache.directory.server.dhcp
 
 import java.nio.ByteBuffer;
 
+import org.apache.directory.junit.tools.Concurrent;
+import org.apache.directory.junit.tools.ConcurrentJunitRunner;
 import org.apache.directory.server.dhcp.io.DhcpMessageDecoder;
 import org.apache.directory.server.dhcp.messages.DhcpMessage;
 import org.junit.Test;
+import org.junit.runner.RunWith;
 
 
 /**
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
+@RunWith(ConcurrentJunitRunner.class)
+@Concurrent()
 public class DhcpMessageDecoderTest extends AbstractDhcpTestCase
 {
     private ByteBuffer requestByteBuffer;

Modified: directory/apacheds/trunk/protocol-kerberos/pom.xml
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/protocol-kerberos/pom.xml?rev=955186&r1=955185&r2=955186&view=diff
==============================================================================
--- directory/apacheds/trunk/protocol-kerberos/pom.xml (original)
+++ directory/apacheds/trunk/protocol-kerberos/pom.xml Wed Jun 16 10:46:18 2010
@@ -32,6 +32,12 @@
 
   <dependencies>
     <dependency>
+      <groupId>org.apache.directory.junit</groupId>
+      <artifactId>junit-addons</artifactId>
+      <scope>test</scope>
+    </dependency>
+
+    <dependency>
       <groupId>${project.groupId}</groupId>
       <artifactId>apacheds-core-api</artifactId>
     </dependency>

Modified: directory/apacheds/trunk/protocol-kerberos/src/test/java/org/apache/directory/server/kerberos/messages/value/OptionsTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/protocol-kerberos/src/test/java/org/apache/directory/server/kerberos/messages/value/OptionsTest.java?rev=955186&r1=955185&r2=955186&view=diff
==============================================================================
--- directory/apacheds/trunk/protocol-kerberos/src/test/java/org/apache/directory/server/kerberos/messages/value/OptionsTest.java (original)
+++ directory/apacheds/trunk/protocol-kerberos/src/test/java/org/apache/directory/server/kerberos/messages/value/OptionsTest.java Wed Jun 16 10:46:18 2010
@@ -22,19 +22,25 @@ package org.apache.directory.server.kerb
 
 import java.util.Arrays;
 
+import org.apache.directory.junit.tools.Concurrent;
+import org.apache.directory.junit.tools.ConcurrentJunitRunner;
 import org.apache.directory.server.kerberos.shared.messages.value.KdcOptions;
 import org.apache.directory.server.kerberos.shared.messages.value.flags.TicketFlag;
 import org.apache.directory.server.kerberos.shared.messages.value.flags.TicketFlags;
 import org.junit.Test;
+import org.junit.runner.RunWith;
+
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertTrue;
 
 /**
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
+@RunWith(ConcurrentJunitRunner.class)
+@Concurrent()
 public class OptionsTest
 {
-    private byte[] fpriOptions =
+    private static final byte[] fpriOptions =
         { ( byte ) 0x50, ( byte ) 0x00, ( byte ) 0x00, ( byte ) 0x10 };
 
 

Modified: directory/apacheds/trunk/protocol-ldap/pom.xml
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/protocol-ldap/pom.xml?rev=955186&r1=955185&r2=955186&view=diff
==============================================================================
--- directory/apacheds/trunk/protocol-ldap/pom.xml (original)
+++ directory/apacheds/trunk/protocol-ldap/pom.xml Wed Jun 16 10:46:18 2010
@@ -32,6 +32,12 @@
 
   <dependencies>
     <dependency>
+      <groupId>org.apache.directory.junit</groupId>
+      <artifactId>junit-addons</artifactId>
+      <scope>test</scope>
+    </dependency>
+
+    <dependency>
       <groupId>${project.groupId}</groupId>
       <artifactId>apacheds-core</artifactId>
     </dependency>

Modified: directory/apacheds/trunk/protocol-ldap/src/test/java/org/apache/directory/server/ldap/LdapServerSettingsTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/protocol-ldap/src/test/java/org/apache/directory/server/ldap/LdapServerSettingsTest.java?rev=955186&r1=955185&r2=955186&view=diff
==============================================================================
--- directory/apacheds/trunk/protocol-ldap/src/test/java/org/apache/directory/server/ldap/LdapServerSettingsTest.java (original)
+++ directory/apacheds/trunk/protocol-ldap/src/test/java/org/apache/directory/server/ldap/LdapServerSettingsTest.java Wed Jun 16 10:46:18 2010
@@ -21,10 +21,14 @@ package org.apache.directory.server.ldap
 
 
 import org.junit.Test;
+import org.junit.runner.RunWith;
+
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertNull;
 import static org.junit.Assert.assertTrue;
 
+import org.apache.directory.junit.tools.Concurrent;
+import org.apache.directory.junit.tools.ConcurrentJunitRunner;
 import org.apache.directory.server.ldap.ExtendedOperationHandler;
 import org.apache.directory.server.ldap.LdapServer;
 import org.apache.directory.server.ldap.handlers.bind.MechanismHandler;
@@ -43,6 +47,8 @@ import java.util.HashMap;
  *
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
+@RunWith(ConcurrentJunitRunner.class)
+@Concurrent()
 public class LdapServerSettingsTest
 {
     @Test

Modified: directory/apacheds/trunk/protocol-ldap/src/test/java/org/apache/directory/server/ldap/SettingAlternativeHandlersTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/protocol-ldap/src/test/java/org/apache/directory/server/ldap/SettingAlternativeHandlersTest.java?rev=955186&r1=955185&r2=955186&view=diff
==============================================================================
--- directory/apacheds/trunk/protocol-ldap/src/test/java/org/apache/directory/server/ldap/SettingAlternativeHandlersTest.java (original)
+++ directory/apacheds/trunk/protocol-ldap/src/test/java/org/apache/directory/server/ldap/SettingAlternativeHandlersTest.java Wed Jun 16 10:46:18 2010
@@ -20,8 +20,11 @@
 package org.apache.directory.server.ldap;
 
 
+import static org.junit.Assert.assertEquals;
+
+import org.apache.directory.junit.tools.Concurrent;
+import org.apache.directory.junit.tools.ConcurrentJunitRunner;
 import org.apache.directory.server.core.DirectoryService;
-import org.apache.directory.server.ldap.LdapServer;
 import org.apache.directory.server.ldap.handlers.AbandonHandler;
 import org.apache.directory.server.ldap.handlers.AddHandler;
 import org.apache.directory.server.ldap.handlers.BindHandler;
@@ -42,27 +45,18 @@ import org.apache.directory.shared.ldap.
 import org.apache.directory.shared.ldap.message.internal.InternalSearchRequest;
 import org.apache.directory.shared.ldap.message.internal.InternalUnbindRequest;
 import org.apache.mina.core.session.IoSession;
-import org.junit.Before;
 import org.junit.Test;
-import static org.junit.Assert.assertEquals;
+import org.junit.runner.RunWith;
 
 /**
  * This test is simply used to test that handlers can be set properly.
  *
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
+@RunWith(ConcurrentJunitRunner.class)
+@Concurrent()
 public class SettingAlternativeHandlersTest
 {
-    LdapServer ldapServer;
-
-
-    @Before
-    public void setUp() throws Exception
-    {
-        ldapServer = new LdapServer();
-    }
-
-
     /**
      * Tests to make sure all the default handlers are kicking in properly with
      * the right request type.
@@ -73,6 +67,7 @@ public class SettingAlternativeHandlersT
     @Test
     public void testDefaultOperation() 
     {
+        LdapServer ldapServer = new LdapServer();
         assertEquals( ldapServer.getName(), LdapServer.SERVICE_NAME );
     }
 
@@ -86,7 +81,8 @@ public class SettingAlternativeHandlersT
      */
     @Test
     public void testAlternativeConfiguration()
-    { 
+    {
+        LdapServer ldapServer = new LdapServer();
         ldapServer.setAbandonHandler( new BogusAbandonHandler() );
         ldapServer.setAddHandler( new BogusAddHandler() );
         ldapServer.setBindHandler( new BogusBindHandler() );

Modified: directory/apacheds/trunk/xdbm-partition/pom.xml
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/xdbm-partition/pom.xml?rev=955186&r1=955185&r2=955186&view=diff
==============================================================================
--- directory/apacheds/trunk/xdbm-partition/pom.xml (original)
+++ directory/apacheds/trunk/xdbm-partition/pom.xml Wed Jun 16 10:46:18 2010
@@ -31,6 +31,12 @@
   
   <dependencies>
     <dependency>
+      <groupId>org.apache.directory.junit</groupId>
+      <artifactId>junit-addons</artifactId>
+      <scope>test</scope>
+    </dependency>
+
+    <dependency>
       <groupId>${project.groupId}</groupId>
       <artifactId>apacheds-core-avl</artifactId>
     </dependency>

Modified: directory/apacheds/trunk/xdbm-partition/src/test/java/org/apache/directory/server/xdbm/impl/avl/AvlTableTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/xdbm-partition/src/test/java/org/apache/directory/server/xdbm/impl/avl/AvlTableTest.java?rev=955186&r1=955185&r2=955186&view=diff
==============================================================================
--- directory/apacheds/trunk/xdbm-partition/src/test/java/org/apache/directory/server/xdbm/impl/avl/AvlTableTest.java (original)
+++ directory/apacheds/trunk/xdbm-partition/src/test/java/org/apache/directory/server/xdbm/impl/avl/AvlTableTest.java Wed Jun 16 10:46:18 2010
@@ -29,11 +29,14 @@ import static org.junit.Assert.assertTru
 
 import java.util.Comparator;
 
+import org.apache.directory.junit.tools.Concurrent;
+import org.apache.directory.junit.tools.ConcurrentJunitRunner;
 import org.apache.directory.server.xdbm.impl.avl.AvlTable;
 import org.apache.directory.shared.ldap.cursor.Cursor;
 import org.apache.directory.shared.ldap.cursor.Tuple;
 import org.junit.Before;
 import org.junit.Test;
+import org.junit.runner.RunWith;
 
 
 /**
@@ -41,16 +44,18 @@ import org.junit.Test;
  *
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
+@RunWith(ConcurrentJunitRunner.class)
+@Concurrent()
 public class AvlTableTest
 {
     private AvlTable<Integer,Integer> dups;
     private AvlTable<Integer,Integer> nodups;
+    private final Comparator<Integer> comparator = new IntComparator();
     
     
     @Before
     public void setUp()
     {
-        IntComparator comparator = new IntComparator();
         dups = new AvlTable<Integer,Integer>( "dups", comparator, comparator, true );
         nodups = new AvlTable<Integer,Integer>( "nodups", comparator, comparator, false );
     }



Mime
View raw message