Re: SelectTranslatorTest

From: Kevin Menard (nirvdru..mail.com)
Date: Tue Feb 10 2009 - 12:25:57 EST

  • Next message: Damir Bijuklic: "PropertyUtils compiled accesor for nested properties bug?"

    The patch applied cleanly and fixed the problem on Ubuntu. Still need
    to test on IDEA in MacOS X, but I suspect it will work as well.

    -- 
    Kevin
    

    On Mon, Feb 9, 2009 at 8:50 AM, Kevin Menard <nirvdru..mail.com> wrote: > I'll give it a look later this evening. > > -- > Kevin > > > > On Mon, Feb 9, 2009 at 8:13 AM, Andrus Adamchik <andru..bjectstyle.org> wrote: >> There's already a patch by Olga: >> >> https://issues.apache.org/cayenne/secure/attachment/10812/SelectTranslatorTest.txt >> >> I haven't looked at it yet, so you are welcome to try it out and commit if >> it works. >> >> Andrus >> >> On Feb 9, 2009, at 3:10 PM, Kevin Menard wrote: >> >>> Knowing that it is a legitimate failure, I can take a crack at it, >>> too. The failure is very reproducible for me. I know how much of a >>> pain it can be to track down something you don't see yourself. >>> >>> -- >>> Kevin >>> >>> >>> >>> On Mon, Feb 9, 2009 at 2:00 AM, Andrus Adamchik <andru..bjectstyle.org> >>> wrote: >>>> >>>> I see. The failures seem to be related to indeterministic order of >>>> columns >>>> in the SELECT clause. I.e. the string produced has all the same columns >>>> as >>>> the string expected, just in a different order. Let me take a look. >>>> >>>> Andrus >>>> >>>> >>>> On Feb 8, 2009, at 7:45 PM, Kevin Menard wrote: >>>> >>>>> Here is the surefire report. The NPEs seem to be a result of the >>>>> joinStack being NULL. I traced through a debugger and it indeed is >>>>> never initialized. Like I said, when I ran this test class in >>>>> isolation in MacOS, I found the same problem. But not when run >>>>> through maven. >>>>> >>>>> I didn't bother looking in depth at the 4 failures, just the 2 errors. >>>>> >>>>> -- >>>>> Kevin >>>>> >>>>> >>>>> >>>>> ------------------------------------------------------------------------------- >>>>> Test set: org.apache.cayenne.access.trans.SelectTranslatorTest >>>>> >>>>> >>>>> ------------------------------------------------------------------------------- >>>>> Tests run: 17, Failures: 4, Errors: 2, Skipped: 0, Time elapsed: 0.054 >>>>> sec <<< FAILURE! >>>>> >>>>> >>>>> testCreateSqlStringWithQuoteSqlIdentifiers(org.apache.cayenne.access.trans.SelectTranslatorTest) >>>>> Time elapsed: 0.001 sec <<< FAILURE! >>>>> junit.framework.ComparisonFailure: expected:<...ARTIST_NAME", >>>>> "t0"."ARTIST_ID", "t0"."DATE_OF_BIRTH...> but was:<...DATE_OF_BIRTH", >>>>> "t0"."ARTIST_ID", "t0"."ARTIST_NAME...> >>>>> at junit.framework.Assert.assertEquals(Assert.java:81) >>>>> at junit.framework.Assert.assertEquals(Assert.java:87) >>>>> at >>>>> >>>>> org.apache.cayenne.access.trans.SelectTranslatorTest$12.test(SelectTranslatorTest.java:484) >>>>> at >>>>> >>>>> org.apache.cayenne.access.trans.SelectTranslatorTest$Template.test(SelectTranslatorTest.java:966) >>>>> at >>>>> >>>>> org.apache.cayenne.access.trans.SelectTranslatorTest.testCreateSqlStringWithQuoteSqlIdentifiers(SelectTranslatorTest.java:488) >>>>> >>>>> >>>>> >>>>> testCreateSqlStringWithQuoteSqlIdentifiers2(org.apache.cayenne.access.trans.SelectTranslatorTest) >>>>> Time elapsed: 0.001 sec <<< FAILURE! >>>>> junit.framework.ComparisonFailure: expected:<...ARTIST_NAME", >>>>> "t0"."ARTIST_ID", "t0"."DATE_OF_BIRTH...> but was:<...DATE_OF_BIRTH", >>>>> "t0"."ARTIST_ID", "t0"."ARTIST_NAME...> >>>>> at junit.framework.Assert.assertEquals(Assert.java:81) >>>>> at junit.framework.Assert.assertEquals(Assert.java:87) >>>>> at >>>>> >>>>> org.apache.cayenne.access.trans.SelectTranslatorTest$13.test(SelectTranslatorTest.java:566) >>>>> at >>>>> >>>>> org.apache.cayenne.access.trans.SelectTranslatorTest$Template.test(SelectTranslatorTest.java:966) >>>>> at >>>>> >>>>> org.apache.cayenne.access.trans.SelectTranslatorTest.testCreateSqlStringWithQuoteSqlIdentifiers2(SelectTranslatorTest.java:570) >>>>> >>>>> >>>>> >>>>> testCreateSqlStringWithQuoteSqlIdentifiers3(org.apache.cayenne.access.trans.SelectTranslatorTest) >>>>> Time elapsed: 0.005 sec <<< FAILURE! >>>>> junit.framework.ComparisonFailure: expected:<...ARTIST_NAME", >>>>> "t0"."ARTIST_ID", "t0"."DATE_OF_BIRTH...> but was:<...DATE_OF_BIRTH", >>>>> "t0"."ARTIST_ID", "t0"."ARTIST_NAME...> >>>>> at junit.framework.Assert.assertEquals(Assert.java:81) >>>>> at junit.framework.Assert.assertEquals(Assert.java:87) >>>>> at >>>>> >>>>> org.apache.cayenne.access.trans.SelectTranslatorTest$14.test(SelectTranslatorTest.java:739) >>>>> at >>>>> >>>>> org.apache.cayenne.access.trans.SelectTranslatorTest$Template.test(SelectTranslatorTest.java:966) >>>>> at >>>>> >>>>> org.apache.cayenne.access.trans.SelectTranslatorTest.testCreateSqlStringWithQuoteSqlIdentifiers3(SelectTranslatorTest.java:743) >>>>> >>>>> >>>>> >>>>> testCreateSqlStringWithQuoteSqlIdentifiers4(org.apache.cayenne.access.trans.SelectTranslatorTest) >>>>> Time elapsed: 0.001 sec <<< FAILURE! >>>>> junit.framework.ComparisonFailure: expected:<...ARTIST_ID", >>>>> "t0"."PAINTING_ID", "t0"."GALLERY_ID", "t0"."PAINTING_DESCRIPTION", >>>>> "t0"."ESTIMATED_PRICE", "t0"."PAINTING_TITLE...> but >>>>> was:<...PAINTING_TITLE", "t0"."ARTIST_ID", >>>>> "t0"."PAINTING_DESCRIPTION", "t0"."ESTIMATED_PRICE", >>>>> "t0"."GALLERY_ID", "t0"."PAINTING_ID...> >>>>> at junit.framework.Assert.assertEquals(Assert.java:81) >>>>> at junit.framework.Assert.assertEquals(Assert.java:87) >>>>> at >>>>> >>>>> org.apache.cayenne.access.trans.SelectTranslatorTest$15.test(SelectTranslatorTest.java:879) >>>>> at >>>>> >>>>> org.apache.cayenne.access.trans.SelectTranslatorTest$Template.test(SelectTranslatorTest.java:966) >>>>> at >>>>> >>>>> org.apache.cayenne.access.trans.SelectTranslatorTest.testCreateSqlStringWithQuoteSqlIdentifiers4(SelectTranslatorTest.java:883) >>>>> >>>>> >>>>> >>>>> testBuildResultColumns1(org.apache.cayenne.access.trans.SelectTranslatorTest) >>>>> Time elapsed: 0.006 sec <<< ERROR! >>>>> java.lang.NullPointerException >>>>> at >>>>> >>>>> org.apache.cayenne.access.trans.SelectTranslator.getCurrentAlias(SelectTranslator.java:213) >>>>> at >>>>> >>>>> org.apache.cayenne.access.trans.SelectTranslator.appendColumn(SelectTranslator.java:568) >>>>> at >>>>> >>>>> org.apache.cayenne.access.trans.SelectTranslator.access$000(SelectTranslator.java:61) >>>>> at >>>>> >>>>> org.apache.cayenne.access.trans.SelectTranslator$1.visitRelationship(SelectTranslator.java:347) >>>>> at >>>>> >>>>> org.apache.cayenne.access.trans.SelectTranslator$1.visitToOne(SelectTranslator.java:334) >>>>> at >>>>> >>>>> org.apache.cayenne.reflect.generic.DataObjectToOneProperty.visit(DataObjectToOneProperty.java:87) >>>>> at >>>>> >>>>> org.apache.cayenne.reflect.PersistentDescriptor.visitDeclaredProperties(PersistentDescriptor.java:374) >>>>> at >>>>> >>>>> org.apache.cayenne.reflect.PersistentDescriptor.visitProperties(PersistentDescriptor.java:406) >>>>> at >>>>> >>>>> org.apache.cayenne.reflect.PersistentDescriptor.visitAllProperties(PersistentDescriptor.java:386) >>>>> at >>>>> >>>>> org.apache.cayenne.reflect.LazyClassDescriptorDecorator.visitAllProperties(LazyClassDescriptorDecorator.java:184) >>>>> at >>>>> >>>>> org.apache.cayenne.access.trans.SelectTranslator.appendQueryColumns(SelectTranslator.java:352) >>>>> at >>>>> >>>>> org.apache.cayenne.access.trans.SelectTranslator.buildResultColumns(SelectTranslator.java:275) >>>>> at >>>>> >>>>> org.apache.cayenne.access.trans.SelectTranslatorTest.testBuildResultColumns1(SelectTranslatorTest.java:898) >>>>> >>>>> >>>>> >>>>> testBuildResultColumns2(org.apache.cayenne.access.trans.SelectTranslatorTest) >>>>> Time elapsed: 0.003 sec <<< ERROR! >>>>> java.lang.NullPointerException >>>>> at >>>>> >>>>> org.apache.cayenne.access.trans.SelectTranslator.getCurrentAlias(SelectTranslator.java:213) >>>>> at >>>>> >>>>> org.apache.cayenne.access.trans.SelectTranslator.appendColumn(SelectTranslator.java:568) >>>>> at >>>>> >>>>> org.apache.cayenne.access.trans.SelectTranslator.access$000(SelectTranslator.java:61) >>>>> at >>>>> >>>>> org.apache.cayenne.access.trans.SelectTranslator$1.visitRelationship(SelectTranslator.java:347) >>>>> at >>>>> >>>>> org.apache.cayenne.access.trans.SelectTranslator$1.visitToOne(SelectTranslator.java:334) >>>>> at >>>>> >>>>> org.apache.cayenne.reflect.generic.DataObjectToOneProperty.visit(DataObjectToOneProperty.java:87) >>>>> at >>>>> >>>>> org.apache.cayenne.reflect.PersistentDescriptor.visitDeclaredProperties(PersistentDescriptor.java:374) >>>>> at >>>>> >>>>> org.apache.cayenne.reflect.PersistentDescriptor.visitProperties(PersistentDescriptor.java:406) >>>>> at >>>>> >>>>> org.apache.cayenne.reflect.PersistentDescriptor.visitAllProperties(PersistentDescriptor.java:386) >>>>> at >>>>> >>>>> org.apache.cayenne.reflect.LazyClassDescriptorDecorator.visitAllProperties(LazyClassDescriptorDecorator.java:184) >>>>> at >>>>> >>>>> org.apache.cayenne.access.trans.SelectTranslator.appendQueryColumns(SelectTranslator.java:352) >>>>> at >>>>> >>>>> org.apache.cayenne.access.trans.SelectTranslator.buildResultColumns(SelectTranslator.java:275) >>>>> at >>>>> >>>>> org.apache.cayenne.access.trans.SelectTranslatorTest.testBuildResultColumns2(SelectTranslatorTest.java:918) >>>>> >>>>> -- >>>>> Kevin >>>>> >>>>> >>>>> >>>>> On Sun, Feb 8, 2009 at 12:26 PM, Andrus Adamchik >>>>> <andru..bjectstyle.org> >>>>> wrote: >>>>>> >>>>>> There's a bunch of new tests related to CAY-289. All work for me from >>>>>> Maven >>>>>> or Eclipse on OS X and Fedora. >>>>>> >>>>>> What are the failures? >>>>>> >>>>>> Andrus >>>>>> >>>>>> On Feb 8, 2009, at 6:44 PM, Kevin Menard wrote: >>>>>> >>>>>>> Does anyone know what the deal with SelectTranslatorTest is? I assume >>>>>>> it's supposed to pass, but I'm seeing some oddities: >>>>>>> >>>>>>> MacOS + mvn: PASS (or at least no failure raised) >>>>>>> MacOS + run in IDEA: FAIL >>>>>>> Ubuntu + mvn: FAIL >>>>>>> Ubuntu + run in IDEA: FAIL >>>>>>> >>>>>>> So, I'm wondering if someone did something to cause the test to skip >>>>>>> for maven and it only works on MacOS or if there's a bug even with our >>>>>>> maven build. >>>>>>> >>>>>>> -- >>>>>>> Kevin >>>>>>> >>>>>> >>>>>> >>>>> >>>> >>>> >>> >> >> >



    This archive was generated by hypermail 2.0.0 : Tue Feb 10 2009 - 12:26:29 EST