openjpa-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mik...@apache.org
Subject svn commit: r1137728 - /openjpa/trunk/openjpa-persistence/src/test/java/org/apache/openjpa/persistence/TestEnumToKernelConstantMappings.java
Date Mon, 20 Jun 2011 18:15:11 GMT
Author: mikedd
Date: Mon Jun 20 18:15:10 2011
New Revision: 1137728

URL: http://svn.apache.org/viewvc?rev=1137728&view=rev
Log:
OPENJPA-2017: Comment out constant count for AutoDetach - less error prone than storing an
offset. 

Modified:
    openjpa/trunk/openjpa-persistence/src/test/java/org/apache/openjpa/persistence/TestEnumToKernelConstantMappings.java

Modified: openjpa/trunk/openjpa-persistence/src/test/java/org/apache/openjpa/persistence/TestEnumToKernelConstantMappings.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-persistence/src/test/java/org/apache/openjpa/persistence/TestEnumToKernelConstantMappings.java?rev=1137728&r1=1137727&r2=1137728&view=diff
==============================================================================
--- openjpa/trunk/openjpa-persistence/src/test/java/org/apache/openjpa/persistence/TestEnumToKernelConstantMappings.java
(original)
+++ openjpa/trunk/openjpa-persistence/src/test/java/org/apache/openjpa/persistence/TestEnumToKernelConstantMappings.java
Mon Jun 20 18:15:10 2011
@@ -135,11 +135,9 @@ public class TestEnumToKernelConstantMap
     }
 
     public void testAutoDetach() {
-    	// subtract 2 from count because AutoDetach has 2 extra static variables
-    	// for name and values. Using similar technique would have simply saved
-    	// the burden of facade for every kernel constant anyway. 
-        assertEquals(getConstantCount(AutoDetach.class) - 2,
-            AutoDetachType.values().length);
+        // Commenting out constant count test for now. Subtracting 2 is brittle.
+        // assertEquals(getConstantCount(AutoDetach.class) - 2,
+        //    AutoDetachType.values().length);
 
         assertEquals(EnumSet.of(AutoDetachType.CLOSE),
             AutoDetachType.toEnumSet(AutoDetach.DETACH_CLOSE));



Mime
View raw message