You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomee.apache.org by Rick McGuire <ri...@gmail.com> on 2008/06/13 16:54:32 UTC

SunCmpConversionTest failure in trunk.

I'm getting the following failure in the SunCmpConversionTest when 
trying to build trunk.  At first, I was convinced it had to be related 
to the changes I was making, but I see the same failure on a fresh 
checkout too.  It also occurs on both Windows and Linux, so it's not 
just a Win problem either. 

-------------------------------------------------------------------------------
Test set: org.apache.openejb.config.SunCmpConversionTest
-------------------------------------------------------------------------------
Tests run: 8, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 8.563 
sec <<< FAILURE!
testItests22(org.apache.openejb.config.SunCmpConversionTest)  Time 
elapsed: 4.734 sec  <<< FAILURE!
junit.framework.AssertionFailedError: Files are not similar 
org.custommonkey.xmlunit.DetailedDiff
[different] Expected presence of child nodes to be 'true' but was 
'false' - comparing <one-to-one...> at 
/entity-mappings[1]/entity[10]/attributes[1]/one-to-one[1] to 
<one-to-one...> at 
/entity-mappings[1]/entity[10]/attributes[1]/one-to-one[1]

    at junit.framework.Assert.fail(Assert.java:47)
    at junit.framework.Assert.assertTrue(Assert.java:20)
    at 
org.apache.openejb.config.SunCmpConversionTest.convert(SunCmpConversionTest.java:137)
    at 
org.apache.openejb.config.SunCmpConversionTest.convert(SunCmpConversionTest.java:87)
    at 
org.apache.openejb.config.SunCmpConversionTest.testItests22(SunCmpConversionTest.java:51)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:585)
    at junit.framework.TestCase.runTest(TestCase.java:168)
    at junit.framework.TestCase.runBare(TestCase.java:134)
    at junit.framework.TestResult$1.protect(TestResult.java:110)
    at junit.framework.TestResult.runProtected(TestResult.java:128)
    at junit.framework.TestResult.run(TestResult.java:113)
    at junit.framework.TestCase.run(TestCase.java:124)
    at junit.framework.TestSuite.runTest(TestSuite.java:232)
    at junit.framework.TestSuite.run(TestSuite.java:227)
    at 
org.junit.internal.runners.JUnit38ClassRunner.run(JUnit38ClassRunner.java:81)
    at 
org.apache.maven.surefire.junit4.JUnit4TestSet.execute(JUnit4TestSet.java:62)
    at 
org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.executeTestSet(AbstractDirectoryTestSuite.java:140)
    at 
org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.execute(AbstractDirectoryTestSuite.java:165)
    at org.apache.maven.surefire.Surefire.run(Surefire.java:107)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:585)
    at 
org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(SurefireBooter.java:289)
    at 
org.apache.maven.surefire.booter.SurefireBooter.main(SurefireBooter.java:993)


The failure appears be because the test is expecting the 
OneOwningSideBean information to include a join-column element:

    <entity name="OneOwningSideBean" 
class="openejb.org.apache.openejb.test.entity.cmr.cmrmapping.OneOwningSideBean">
        <description>TestModule#OneOwningSideBean</description>
        <table name="OneOwning"/>
        <id-class 
class="org.apache.openejb.test.entity.cmr.cmrmapping.CompoundPK"/>
        <attributes>
            <id name="id">
                <column name="col_id"/>
            </id>
            <id name="field1">
                <column name="col_field1"/>
            </id>
            <one-to-one name="oneInverseSide">
                <join-column referenced-column-name="col_id" 
name="col_field1"/>
            </one-to-one>
        </attributes>
    </entity>


But this is what's getting generated:

    <entity name="OneOwningSideBean" 
class="openejb.org.apache.openejb.test.entity.cmr.cmrmapping.OneOwningSideBean">
        <description>TestModule#OneOwningSideBean</description>
        <table name="OneOwning"/>
        <id-class 
class="org.apache.openejb.test.entity.cmr.cmrmapping.CompoundPK"/>
        <attributes>
            <id name="id">
                <column name="col_id"/>
            </id>
            <id name="field1">
                <column name="col_field1"/>
            </id>
            <one-to-one name="oneInverseSide"/>
        </attributes>
    </entity>


Is the result really incorrect, or is the test case in error?

Rick

Re: SunCmpConversionTest failure in trunk.

Posted by Dain Sundstrom <da...@iq80.com>.
I ran into the same problem, and commented out the test in my local  
check out.  I think David broke it during his last work on CMP.

-dain

On Jun 13, 2008, at 7:54 AM, Rick McGuire wrote:

> I'm getting the following failure in the SunCmpConversionTest when  
> trying to build trunk.  At first, I was convinced it had to be  
> related to the changes I was making, but I see the same failure on a  
> fresh checkout too.  It also occurs on both Windows and Linux, so  
> it's not just a Win problem either.
> -------------------------------------------------------------------------------
> Test set: org.apache.openejb.config.SunCmpConversionTest
> -------------------------------------------------------------------------------
> Tests run: 8, Failures: 1, Errors: 0, Skipped: 0, Time elapsed:  
> 8.563 sec <<< FAILURE!
> testItests22(org.apache.openejb.config.SunCmpConversionTest)  Time  
> elapsed: 4.734 sec  <<< FAILURE!
> junit.framework.AssertionFailedError: Files are not similar  
> org.custommonkey.xmlunit.DetailedDiff
> [different] Expected presence of child nodes to be 'true' but was  
> 'false' - comparing <one-to-one...> at /entity-mappings[1]/ 
> entity[10]/attributes[1]/one-to-one[1] to <one-to-one...> at /entity- 
> mappings[1]/entity[10]/attributes[1]/one-to-one[1]
>
>   at junit.framework.Assert.fail(Assert.java:47)
>   at junit.framework.Assert.assertTrue(Assert.java:20)
>   at  
> org 
> .apache 
> .openejb 
> .config.SunCmpConversionTest.convert(SunCmpConversionTest.java:137)
>   at  
> org 
> .apache 
> .openejb 
> .config.SunCmpConversionTest.convert(SunCmpConversionTest.java:87)
>   at  
> org 
> .apache 
> .openejb 
> .config.SunCmpConversionTest.testItests22(SunCmpConversionTest.java: 
> 51)
>   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>   at  
> sun 
> .reflect 
> .NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>   at  
> sun 
> .reflect 
> .DelegatingMethodAccessorImpl 
> .invoke(DelegatingMethodAccessorImpl.java:25)
>   at java.lang.reflect.Method.invoke(Method.java:585)
>   at junit.framework.TestCase.runTest(TestCase.java:168)
>   at junit.framework.TestCase.runBare(TestCase.java:134)
>   at junit.framework.TestResult$1.protect(TestResult.java:110)
>   at junit.framework.TestResult.runProtected(TestResult.java:128)
>   at junit.framework.TestResult.run(TestResult.java:113)
>   at junit.framework.TestCase.run(TestCase.java:124)
>   at junit.framework.TestSuite.runTest(TestSuite.java:232)
>   at junit.framework.TestSuite.run(TestSuite.java:227)
>   at  
> org 
> .junit 
> .internal.runners.JUnit38ClassRunner.run(JUnit38ClassRunner.java:81)
>   at  
> org 
> .apache 
> .maven.surefire.junit4.JUnit4TestSet.execute(JUnit4TestSet.java:62)
>   at  
> org 
> .apache 
> .maven 
> .surefire 
> .suite 
> .AbstractDirectoryTestSuite 
> .executeTestSet(AbstractDirectoryTestSuite.java:140)
>   at  
> org 
> .apache 
> .maven 
> .surefire 
> .suite 
> .AbstractDirectoryTestSuite.execute(AbstractDirectoryTestSuite.java: 
> 165)
>   at org.apache.maven.surefire.Surefire.run(Surefire.java:107)
>   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>   at  
> sun 
> .reflect 
> .NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>   at  
> sun 
> .reflect 
> .DelegatingMethodAccessorImpl 
> .invoke(DelegatingMethodAccessorImpl.java:25)
>   at java.lang.reflect.Method.invoke(Method.java:585)
>   at  
> org 
> .apache 
> .maven 
> .surefire 
> .booter.SurefireBooter.runSuitesInProcess(SurefireBooter.java:289)
>   at  
> org 
> .apache 
> .maven.surefire.booter.SurefireBooter.main(SurefireBooter.java:993)
>
>
> The failure appears be because the test is expecting the  
> OneOwningSideBean information to include a join-column element:
>
>   <entity name="OneOwningSideBean"  
> class 
> = 
> "openejb 
> .org.apache.openejb.test.entity.cmr.cmrmapping.OneOwningSideBean">
>       <description>TestModule#OneOwningSideBean</description>
>       <table name="OneOwning"/>
>       <id-class  
> class="org.apache.openejb.test.entity.cmr.cmrmapping.CompoundPK"/>
>       <attributes>
>           <id name="id">
>               <column name="col_id"/>
>           </id>
>           <id name="field1">
>               <column name="col_field1"/>
>           </id>
>           <one-to-one name="oneInverseSide">
>               <join-column referenced-column-name="col_id"  
> name="col_field1"/>
>           </one-to-one>
>       </attributes>
>   </entity>
>
>
> But this is what's getting generated:
>
>   <entity name="OneOwningSideBean"  
> class 
> = 
> "openejb 
> .org.apache.openejb.test.entity.cmr.cmrmapping.OneOwningSideBean">
>       <description>TestModule#OneOwningSideBean</description>
>       <table name="OneOwning"/>
>       <id-class  
> class="org.apache.openejb.test.entity.cmr.cmrmapping.CompoundPK"/>
>       <attributes>
>           <id name="id">
>               <column name="col_id"/>
>           </id>
>           <id name="field1">
>               <column name="col_field1"/>
>           </id>
>           <one-to-one name="oneInverseSide"/>
>       </attributes>
>   </entity>
>
>
> Is the result really incorrect, or is the test case in error?
>
> Rick