|
[
Permlink
| « Hide
]
Craig Russell added a comment - 16/Jul/05 04:33 AM
This appears to be incorrect mapping.
I fixed the mapping problem (revision 21976), but the error persists. This appears to be a JPOX problem. After clearing the cache, the values of some fields are null. The error message is changed because of improvements to TestFieldsOfObject checked in by Craig.
[java] 1) test(org.apache.jdo.tck.models.fieldtypes.TestFieldsOfObject)junit.framework.AssertionFailedError [java] Field private Object Object0 is null. Expected Hello. [java] Field private volatile Object Object16 is null. Expected Hello. [java] Field public Object Object36 is null. Expected Hello. [java] Field public volatile Object Object52 is null. Expected Hello. [java] Field protected Object Object72 is null. Expected Hello. [java] Field protected volatile Object Object88 is null. Expected Hello. [java] Field Object Object108 is null. Expected Hello. [java] Field volatile Object Object124 is null. Expected Hello. [java] [java] at org.apache.jdo.tck.JDO_Test.fail(JDO_Test.java:537) [java] at org.apache.jdo.tck.models.fieldtypes.TestFieldsOfObject.checkValues(TestFieldsOfObject.java: [java] at org.apache.jdo.tck.models.fieldtypes.TestFieldsOfObject.runTest(TestFieldsOfObject.java:99) [java] at org.apache.jdo.tck.models.fieldtypes.TestFieldsOfObject.test(TestFieldsOfObject.java:68) [java] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [java] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) [java] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) [java] at org.apache.jdo.tck.JDO_Test.runBare(JDO_Test.java:197) [java] at org.apache.jdo.tck.util.BatchTestRunner.start(BatchTestRunner.java:128) [java] at org.apache.jdo.tck.util.BatchTestRunner.main(BatchTestRunner.java:106) [java] FAILURES!!! Maybe I'm missing something about this test, but I look at Object0, Object16, etc and I see that the field is an Object, and in the metadata there is nothing to define the persistence-modifier as "persistent" so they will revert to the default value of "persistence-modifier" as per JDO 2 spec 18.13, which has to be "none" since java.lang.Object doesnt appear in the list of persistent field types. This means that it will not be persisted and hence *will* be null when read back in. So the FieldsOfObject.isPersistent is incorrect ?
You are not missing anything. The test is incorrect. It has been incorrect from the JDO 1 TCK. Funny no one noticed it earlier.
The fields that are missing are indeed defaulted to persistence-modifier="none". But the test expects the fields to default to "persistent". The test case needs to be changed to identify these fields as not persistent. Index: test/java/org/apache/jdo/tck/pc/fieldtypes/FieldsOfObject.java
=================================================================== --- test/java/org/apache/jdo/tck/pc/fieldtypes/FieldsOfObject.java (revision 225197) +++ test/java/org/apache/jdo/tck/pc/fieldtypes/FieldsOfObject.java (working copy) @@ -166,19 +166,19 @@ static transient volatile Object Object143; public static final boolean [] isPersistent = { -true,true,true,false,true,true,true,false,false,false, -false,true,true,true,false,false,true,true,true,false, +false,true,true,false,true,true,true,false,false,false, +false,true,true,true,false,false,false,true,true,false, true,true,true,false,false,false,false,false,false,false, -true,true,true,false,false,false,true,true,true,false, +true,true,true,false,false,false,false,true,true,false, true,true,true,false,false,false,false,true,true,true, -false,false,true,true,true,false,true,true,true,false, +false,false,false,true,true,false,true,true,true,false, false,false,false,false,false,false,true,true,true,false, -false,false,true,true,true,false,true,true,true,false, -false,false,false,true,true,true,false,false,true,true, +false,false,false,true,true,false,true,true,true,false, +false,false,false,true,true,true,false,false,false,true, true,false,true,true,true,false,false,false,false,false, -false,false,true,true,true,false,false,false,true,true, +false,false,true,true,true,false,false,false,false,true, true,false,true,true,true,false,false,false,false,true, -true,true,false,false,true,true,true,false,true,true, +true,true,false,false,false,true,true,false,true,true, true,false,false,false,false,false,false,false,true,true, true,false,false,false }; Reopened to set the Fix Version/s field to JDO 2 beta.
|
||||||||||||||||||||||||||||||||||||||||||||||||||