You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openjpa.apache.org by mc...@apache.org on 2009/10/14 17:09:58 UTC

svn commit: r825161 - /openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/jdbc/writebehind/crud/TestEmbeddable.java

Author: mcconne
Date: Wed Oct 14 15:09:58 2009
New Revision: 825161

URL: http://svn.apache.org/viewvc?rev=825161&view=rev
Log:
OPENJPA-1348 Use @AllowFailure annotation rather than commenting out failing testcase

Modified:
    openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/jdbc/writebehind/crud/TestEmbeddable.java

Modified: openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/jdbc/writebehind/crud/TestEmbeddable.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/jdbc/writebehind/crud/TestEmbeddable.java?rev=825161&r1=825160&r2=825161&view=diff
==============================================================================
--- openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/jdbc/writebehind/crud/TestEmbeddable.java (original)
+++ openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/jdbc/writebehind/crud/TestEmbeddable.java Wed Oct 14 15:09:58 2009
@@ -25,6 +25,7 @@
 import org.apache.openjpa.jdbc.writebehind.entities.Entity02;
 import org.apache.openjpa.persistence.OpenJPAEntityManagerFactorySPI;
 import org.apache.openjpa.persistence.OpenJPAEntityManagerSPI;
+import org.apache.openjpa.persistence.test.AllowFailure;
 import org.apache.openjpa.persistence.test.SingleEMFTestCase;
 import org.apache.openjpa.writebehind.WriteBehindCache;
 import org.apache.openjpa.writebehind.WriteBehindCacheManager;
@@ -123,7 +124,8 @@
      *
      * @exception Exception
      */
-/*  public void testEntity01ManualFlush() { 
+    @AllowFailure(value=true, message="See OPENJPA-1348")
+    public void test_Entity01_Manual_Flush() { 
 
         // 
         // Create a new instance of the entity/embeddable class
@@ -181,10 +183,10 @@
         assertEquals(findEntity01.getEnt01_int01(), 1);
         assertEquals(findEntity01.getEnt01_int02(), 2);
         assertEquals(findEntity01.getEnt01_int03(), 3);
-        assertEquals(fndEntity01.getEmb01_int01(), 4);
+        assertEquals(findEntity01.getEmb01_int01(), 4);
         assertEquals(findEntity01.getEmb01_int02(), 5);
         assertEquals(findEntity01.getEmb01_int03(), 6);
-    }  */
+    }  
 
 
     /**
@@ -192,7 +194,7 @@
      *
      * @exception Exception
      */
-    public void testEntity02ManualFlush() { 
+    public void test_Entity02_Manual_Flush() { 
 
         // 
         // Create a new instance of the entity class



Re: svn commit: r825161 - /openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/jdbc/writebehind/crud/TestEmbeddable.java

Posted by Donald Woods <dw...@apache.org>.
If the intention is to fix the failure before 2.0.0 ships, then I'm all 
for using the @AllowFailure.  What we need, is to run Pinaki's tool as a 
build step to output the number of "skipped" tests at the end, so we 
don't forget about them.


-Donald


Michael Dick wrote:
> Hi Tim,
> 
> I'd actually rather have the testcase commented out if we know it's going to
> fail. @AllowFailure still runs the test so the builds take longer and it
> _looks_ like we have another passing testcase.
> 
> Is there a compelling reason to run the test even though we expect it to
> fail?
> 
> Maybe this is just my personal pet peeve.
> 
> -mike
> 
> On Wed, Oct 14, 2009 at 10:09 AM, <mc...@apache.org> wrote:
> 
>> Author: mcconne
>> Date: Wed Oct 14 15:09:58 2009
>> New Revision: 825161
>>
>> URL: http://svn.apache.org/viewvc?rev=825161&view=rev
>> Log:
>> OPENJPA-1348 Use @AllowFailure annotation rather than commenting out
>> failing testcase
>>
>> Modified:
>>
>>  openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/jdbc/writebehind/crud/TestEmbeddable.java
>>
>> Modified:
>> openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/jdbc/writebehind/crud/TestEmbeddable.java
>> URL:
>> http://svn.apache.org/viewvc/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/jdbc/writebehind/crud/TestEmbeddable.java?rev=825161&r1=825160&r2=825161&view=diff
>>
>> ==============================================================================
>> ---
>> openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/jdbc/writebehind/crud/TestEmbeddable.java
>> (original)
>> +++
>> openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/jdbc/writebehind/crud/TestEmbeddable.java
>> Wed Oct 14 15:09:58 2009
>> @@ -25,6 +25,7 @@
>>  import org.apache.openjpa.jdbc.writebehind.entities.Entity02;
>>  import org.apache.openjpa.persistence.OpenJPAEntityManagerFactorySPI;
>>  import org.apache.openjpa.persistence.OpenJPAEntityManagerSPI;
>> +import org.apache.openjpa.persistence.test.AllowFailure;
>>  import org.apache.openjpa.persistence.test.SingleEMFTestCase;
>>  import org.apache.openjpa.writebehind.WriteBehindCache;
>>  import org.apache.openjpa.writebehind.WriteBehindCacheManager;
>> @@ -123,7 +124,8 @@
>>      *
>>      * @exception Exception
>>      */
>> -/*  public void testEntity01ManualFlush() {
>> +    @AllowFailure(value=true, message="See OPENJPA-1348")
>> +    public void test_Entity01_Manual_Flush() {
>>
>>         //
>>         // Create a new instance of the entity/embeddable class
>> @@ -181,10 +183,10 @@
>>         assertEquals(findEntity01.getEnt01_int01(), 1);
>>         assertEquals(findEntity01.getEnt01_int02(), 2);
>>         assertEquals(findEntity01.getEnt01_int03(), 3);
>> -        assertEquals(fndEntity01.getEmb01_int01(), 4);
>> +        assertEquals(findEntity01.getEmb01_int01(), 4);
>>         assertEquals(findEntity01.getEmb01_int02(), 5);
>>         assertEquals(findEntity01.getEmb01_int03(), 6);
>> -    }  */
>> +    }
>>
>>
>>     /**
>> @@ -192,7 +194,7 @@
>>      *
>>      * @exception Exception
>>      */
>> -    public void testEntity02ManualFlush() {
>> +    public void test_Entity02_Manual_Flush() {
>>
>>         //
>>         // Create a new instance of the entity class
>>
>>
>>
> 

Re: svn commit: r825161 - /openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/jdbc/writebehind/crud/TestEmbeddable.java

Posted by Tim McConnell <ti...@gmail.com>.
Hi Mike, Yeah I guess I don't have a preference either way -- I just figured it 
would be easier to find and fix with the annotation. Plus, I'm sure it'll be 
fixed in short order anyway ;-)

Michael Dick wrote:
> Hi Tim,
> 
> I'd actually rather have the testcase commented out if we know it's going to
> fail. @AllowFailure still runs the test so the builds take longer and it
> _looks_ like we have another passing testcase.
> 
> Is there a compelling reason to run the test even though we expect it to
> fail?
> 
> Maybe this is just my personal pet peeve.
> 
> -mike
> 
> On Wed, Oct 14, 2009 at 10:09 AM, <mc...@apache.org> wrote:
> 
>> Author: mcconne
>> Date: Wed Oct 14 15:09:58 2009
>> New Revision: 825161
>>
>> URL: http://svn.apache.org/viewvc?rev=825161&view=rev
>> Log:
>> OPENJPA-1348 Use @AllowFailure annotation rather than commenting out
>> failing testcase
>>
>> Modified:
>>
>>  openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/jdbc/writebehind/crud/TestEmbeddable.java
>>
>> Modified:
>> openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/jdbc/writebehind/crud/TestEmbeddable.java
>> URL:
>> http://svn.apache.org/viewvc/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/jdbc/writebehind/crud/TestEmbeddable.java?rev=825161&r1=825160&r2=825161&view=diff
>>
>> ==============================================================================
>> ---
>> openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/jdbc/writebehind/crud/TestEmbeddable.java
>> (original)
>> +++
>> openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/jdbc/writebehind/crud/TestEmbeddable.java
>> Wed Oct 14 15:09:58 2009
>> @@ -25,6 +25,7 @@
>>  import org.apache.openjpa.jdbc.writebehind.entities.Entity02;
>>  import org.apache.openjpa.persistence.OpenJPAEntityManagerFactorySPI;
>>  import org.apache.openjpa.persistence.OpenJPAEntityManagerSPI;
>> +import org.apache.openjpa.persistence.test.AllowFailure;
>>  import org.apache.openjpa.persistence.test.SingleEMFTestCase;
>>  import org.apache.openjpa.writebehind.WriteBehindCache;
>>  import org.apache.openjpa.writebehind.WriteBehindCacheManager;
>> @@ -123,7 +124,8 @@
>>      *
>>      * @exception Exception
>>      */
>> -/*  public void testEntity01ManualFlush() {
>> +    @AllowFailure(value=true, message="See OPENJPA-1348")
>> +    public void test_Entity01_Manual_Flush() {
>>
>>         //
>>         // Create a new instance of the entity/embeddable class
>> @@ -181,10 +183,10 @@
>>         assertEquals(findEntity01.getEnt01_int01(), 1);
>>         assertEquals(findEntity01.getEnt01_int02(), 2);
>>         assertEquals(findEntity01.getEnt01_int03(), 3);
>> -        assertEquals(fndEntity01.getEmb01_int01(), 4);
>> +        assertEquals(findEntity01.getEmb01_int01(), 4);
>>         assertEquals(findEntity01.getEmb01_int02(), 5);
>>         assertEquals(findEntity01.getEmb01_int03(), 6);
>> -    }  */
>> +    }
>>
>>
>>     /**
>> @@ -192,7 +194,7 @@
>>      *
>>      * @exception Exception
>>      */
>> -    public void testEntity02ManualFlush() {
>> +    public void test_Entity02_Manual_Flush() {
>>
>>         //
>>         // Create a new instance of the entity class
>>
>>
>>
> 

-- 
Thanks,
Tim McConnell

Re: svn commit: r825161 - /openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/jdbc/writebehind/crud/TestEmbeddable.java

Posted by Michael Dick <mi...@gmail.com>.
Hi Tim,

I'd actually rather have the testcase commented out if we know it's going to
fail. @AllowFailure still runs the test so the builds take longer and it
_looks_ like we have another passing testcase.

Is there a compelling reason to run the test even though we expect it to
fail?

Maybe this is just my personal pet peeve.

-mike

On Wed, Oct 14, 2009 at 10:09 AM, <mc...@apache.org> wrote:

> Author: mcconne
> Date: Wed Oct 14 15:09:58 2009
> New Revision: 825161
>
> URL: http://svn.apache.org/viewvc?rev=825161&view=rev
> Log:
> OPENJPA-1348 Use @AllowFailure annotation rather than commenting out
> failing testcase
>
> Modified:
>
>  openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/jdbc/writebehind/crud/TestEmbeddable.java
>
> Modified:
> openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/jdbc/writebehind/crud/TestEmbeddable.java
> URL:
> http://svn.apache.org/viewvc/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/jdbc/writebehind/crud/TestEmbeddable.java?rev=825161&r1=825160&r2=825161&view=diff
>
> ==============================================================================
> ---
> openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/jdbc/writebehind/crud/TestEmbeddable.java
> (original)
> +++
> openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/jdbc/writebehind/crud/TestEmbeddable.java
> Wed Oct 14 15:09:58 2009
> @@ -25,6 +25,7 @@
>  import org.apache.openjpa.jdbc.writebehind.entities.Entity02;
>  import org.apache.openjpa.persistence.OpenJPAEntityManagerFactorySPI;
>  import org.apache.openjpa.persistence.OpenJPAEntityManagerSPI;
> +import org.apache.openjpa.persistence.test.AllowFailure;
>  import org.apache.openjpa.persistence.test.SingleEMFTestCase;
>  import org.apache.openjpa.writebehind.WriteBehindCache;
>  import org.apache.openjpa.writebehind.WriteBehindCacheManager;
> @@ -123,7 +124,8 @@
>      *
>      * @exception Exception
>      */
> -/*  public void testEntity01ManualFlush() {
> +    @AllowFailure(value=true, message="See OPENJPA-1348")
> +    public void test_Entity01_Manual_Flush() {
>
>         //
>         // Create a new instance of the entity/embeddable class
> @@ -181,10 +183,10 @@
>         assertEquals(findEntity01.getEnt01_int01(), 1);
>         assertEquals(findEntity01.getEnt01_int02(), 2);
>         assertEquals(findEntity01.getEnt01_int03(), 3);
> -        assertEquals(fndEntity01.getEmb01_int01(), 4);
> +        assertEquals(findEntity01.getEmb01_int01(), 4);
>         assertEquals(findEntity01.getEmb01_int02(), 5);
>         assertEquals(findEntity01.getEmb01_int03(), 6);
> -    }  */
> +    }
>
>
>     /**
> @@ -192,7 +194,7 @@
>      *
>      * @exception Exception
>      */
> -    public void testEntity02ManualFlush() {
> +    public void test_Entity02_Manual_Flush() {
>
>         //
>         // Create a new instance of the entity class
>
>
>