directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From seelm...@apache.org
Subject svn commit: r1024162 - /directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/name/DNTest.java
Date Tue, 19 Oct 2010 08:13:05 GMT
Author: seelmann
Date: Tue Oct 19 08:13:05 2010
New Revision: 1024162

URL: http://svn.apache.org/viewvc?rev=1024162&view=rev
Log:
Minor improvement, no need to create OID maps before each test. Also avoids concurrency issues
as test run in parallel which may lead to null references

Modified:
    directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/name/DNTest.java

Modified: directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/name/DNTest.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/name/DNTest.java?rev=1024162&r1=1024161&r2=1024162&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/name/DNTest.java
(original)
+++ directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/name/DNTest.java
Tue Oct 19 08:13:05 2010
@@ -50,7 +50,7 @@ import org.apache.directory.shared.ldap.
 import org.apache.directory.shared.ldap.schema.normalizers.DeepTrimToLowerNormalizer;
 import org.apache.directory.shared.ldap.schema.normalizers.OidNormalizer;
 import org.apache.directory.shared.ldap.util.StringTools;
-import org.junit.Before;
+import org.junit.BeforeClass;
 import org.junit.Ignore;
 import org.junit.Test;
 import org.junit.runner.RunWith;
@@ -65,15 +65,15 @@ import org.junit.runner.RunWith;
 @Concurrent()
 public class DNTest
 {
-    private Map<String, OidNormalizer> oids;
-    private Map<String, OidNormalizer> oidOids;
+    private static Map<String, OidNormalizer> oids;
+    private static Map<String, OidNormalizer> oidOids;
 
 
     /**
      * Initialize OIDs maps for normalization
      */
-    @Before
-    public void initMapOids()
+    @BeforeClass
+    public static void initMapOids()
     {
         oids = new HashMap<String, OidNormalizer>();
 



Mime
View raw message