12-04-07 12:11 PM
[ https://issues.apache.org/jira/brow...action_12548227 ]
Andy Jefferson commented on JDO-559:
------------------------------------
Going further, the persistent interface negative test seems to assume that i
f we don't have a line
<property name="..."/> in the MetaData then a property is not defined. This
will clearly screw up the subsequent tests in companyPMInterface.conf and th
e annotated variants since they don't have the persistent properties present
in MetaData (e.g PIAddress
has no <property> at all in its MetaData)
The current assumptions are
1. for a persistent interface we will internally add metadata for all proper
ties that aren't defined in MetaData, using the type of the property whether
it is default persistent
2. for a persistent class we will internally add metadata for fields that ar
en't defined in MetaData, using the type of the field whether it is default
persistent
3. for a persistent class we DON'T internally add metadata for properties th
at aren't defined in the MetaData
> JPOX fails to throw JDOUserException on some illegal arguments to pm.newIn
stance()
> --------------------------------------------------------------------------
--------
>
> Key: JDO-559
> URL: https://issues.apache.org/jira/browse/JDO-559
> Project: JDO
> Issue Type: Bug
> Components: tck2
> Reporter: Michelle Caisse
> Assignee: Andy Jefferson
> Fix For: JDO 2 maintenance release 1
>
>
> For tests NewInstance (in pm.conf) and NewInstanceBadMapping (in newInstan
ceBadMapping.conf), a number of test failures:
> 1) testNewInstanceInterfaceBad(org.apache.jdo.tck.api.persistencemanager.N
ewInstance)junit.framework.AssertionFailedError: Expected JDOUserException b
ut no exception thrown. Interface contains method not declared as persisten
t property.
> at org.apache.jdo.tck.api.persistencemanager.NewInstance.testNewInstanceI
nterfaceBad(NewInstance.java:99)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.j
ava:39)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccess
orImpl.java:25)
> at org.apache.jdo.tck.JDO_Test.runBare(JDO_Test.java:254)
> at org.apache.jdo.tck.util.BatchTestRunner.doRun(BatchTestRunner.java:108
)
> at org.apache.jdo.tck.util.BatchTestRunner.start(BatchTestRunner.java:148
)
> at org.apache.jdo.tck.util.BatchTestRunner.main(BatchTestRunner.java:123)
> 2) testNewInstanceAbstractClassBad(org.apache.jdo.tck.api.persistencemanager.NewIn
stance)junit.framework.AssertionFailedError: Expected JDOUserException but no except
ion thrown. Abstract class contains abstract method not declared as persistent prop
ert
y.
> at org.apache.jdo.tck.api.persistencemanager.NewInstance.testNewInstanceA
bstractClassBad(NewInstance.java:115)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.j
ava:39)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccess
orImpl.java:25)
> at org.apache.jdo.tck.JDO_Test.runBare(JDO_Test.java:254)
> at org.apache.jdo.tck.util.BatchTestRunner.doRun(BatchTestRunner.java:108
)
> at org.apache.jdo.tck.util.BatchTestRunner.start(BatchTestRunner.java:148
)
> at org.apache.jdo.tck.util.BatchTestRunner.main(BatchTestRunner.java:123)
> RUN NewInstanceBadMapping.testNewInstanceInterface FAILURE
> RUN NewInstanceBadMapping.testNewInstanceAbstractClass FAILURE
> RUN NewInstanceBadMapping.testNewInstanceClass FAILURE
> Description: All pm tests with standard mapping, no testdata.
> Time: 003
> There were 3 failures:
> 1) testNewInstanceInterface(org.apache.jdo.tck.api.persistencemanager.NewI
nstanceBadMapping)junit.framework.AssertionFailedError: Expected JDOUserExce
ption but no exception thrown. Persistent property is not mapped.
> at org.apache.jdo.tck.api.persistencemanager.NewInstanceBadMapping.testNe
wInstanceInterface(NewInstanceBadMapping
.java:66)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.j
ava:39)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccess
orImpl.java:25)
> at org.apache.jdo.tck.JDO_Test.runBare(JDO_Test.java:254)
> at org.apache.jdo.tck.util.BatchTestRunner.doRun(BatchTestRunner.java:108
)
> at org.apache.jdo.tck.util.BatchTestRunner.start(BatchTestRunner.java:148
)
> at org.apache.jdo.tck.util.BatchTestRunner.main(BatchTestRunner.java:123)
> 2) testNewInstanceAbstractClass(org.apache.jdo.tck.api.persistencemanager.
NewInstanceBadMapping)junit.framework.AssertionFailedError: Expected JDOUser
Exception but no exception thrown. Persistent property is not mapped.
> at org.apache.jdo.tck.api.persistencemanager.NewInstanceBadMapping.testNe
wInstanceAbstractClass(NewInstanceBadMap
ping.java:81)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.j
ava:39)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccess
orImpl.java:25)
> at org.apache.jdo.tck.JDO_Test.runBare(JDO_Test.java:254)
> at org.apache.jdo.tck.util.BatchTestRunner.doRun(BatchTestRunner.java:108
)
> at org.apache.jdo.tck.util.BatchTestRunner.start(BatchTestRunner.java:148
)
> at org.apache.jdo.tck.util.BatchTestRunner.main(BatchTestRunner.java:123)
> 3) testNewInstanceClass(org.apache.jdo.tck.api.persistencemanager.NewInsta
nceBadMapping)junit.framework.AssertionFailedError: Expected JDOUserExceptio
n but no exception thrown. Persistent property is not mapped.
> at org.apache.jdo.tck.api.persistencemanager.NewInstanceBadMapping.testNe
wInstanceClass(NewInstanceBadMapping.java:96)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.j
ava:39)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccess
orImpl.java:25)
> at org.apache.jdo.tck.JDO_Test.runBare(JDO_Test.java:254)
> at org.apache.jdo.tck.util.BatchTestRunner.doRun(BatchTestRunner.java:108
)
> at org.apache.jdo.tck.util.BatchTestRunner.start(BatchTestRunner.java:148
)
> at org.apache.jdo.tck.util.BatchTestRunner.main(BatchTestRunner.java:123)
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[ Post a follow-up to this message ]
|