commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From robert burrell donkin <robertburrelldon...@blueyonder.co.uk>
Subject Re: [ANNOUNCEMENT] Betwixt 0.7 Release Candidate 1 Now Available
Date Sun, 26 Jun 2005 18:44:30 GMT
On Fri, 2005-06-24 at 10:42 +1200, Simon Kitching wrote:
> On Fri, 2005-06-24 at 09:37 +1200, Simon Kitching wrote:
> > On Fri, 2005-06-24 at 08:59 +1200, Simon Kitching wrote:
> > > One unit test failed with Java 1.3 (debian sarge):

i tested on 1.3.1 (blackdown JVM on mandrake). 1.3.0 doesn't run on my
box :(

> > > Testcase:
> > > testIntrospectionTimeTypeWrite(org.apache.commons.betwixt.io.read.TestBindTimeTypeMapping):
FAILED
> > > (Unequal node names) expected:<call> but was:<latinName>
> > > junit.framework.ComparisonFailure: (Unequal node names) expected:<call>
> > > but was:<latinName>
> > > 	at
> > > org.apache.commons.betwixt.xmlunit.XmlTestCase.testIsomorphic(XmlTestCase.java:214)
> > > 	at
> > > org.apache.commons.betwixt.xmlunit.XmlTestCase.testIsomorphic(XmlTestCase.java:312)
> > > 	at
> > > org.apache.commons.betwixt.xmlunit.XmlTestCase.testIsomorphic(XmlTestCase.java:312)
> > > 	at
> > > org.apache.commons.betwixt.xmlunit.XmlTestCase.xmlAssertIsomorphic(XmlTestCase.java:175)
> > > 	at
> > > org.apache.commons.betwixt.xmlunit.XmlTestCase.xmlAssertIsomorphicContent(XmlTestCase.java:128)
> > > 	at
> > > org.apache.commons.betwixt.xmlunit.XmlTestCase.xmlAssertIsomorphicContent(XmlTestCase.java:105)
> > > 	at
> > > org.apache.commons.betwixt.xmlunit.XmlTestCase.xmlAssertIsomorphicContent(XmlTestCase.java:96)
> > > 	at
> > > org.apache.commons.betwixt.io.read.TestBindTimeTypeMapping.testIntrospectionTimeTypeWrite(TestBindTimeTypeMapping.java:232)
> > 
> > I modified the test briefly with some println statements, and it looks
> > like another case of different property order in the output. Method
> > testIsomorphic doesn't seem to be working correctly in this case.
> > 
> > But anyway, is it really a good idea to allow the output to vary
> > according to what the JVM-of-the-moment decides? Perhaps betwixt should
> > always sort properties by alphabetical order so that behaviour is then
> > identical across JVMs....

it's a more involved than that because the order is taken from the order
in the bean info for the bean. if betwixt reordered the properties,
people who have created bean info's who have their ordering broken. IMHO
this is really a specification bug: the default order should have been
specified by sun.

still, introducing a pluggable strategy has been on the to do list for
ages now. (but i usually only find time now to patch issues highlighted
by users...) 

> Actually, it appears that this particular test wasn't using the
> "orderIndependent" flag for the xml test. Enabling this makes the test
> pass. I still think having betwixt order the properties is a good idea
> though..but maybe for the next release.
> 
> Line 229 of TestBindTimeTypeMappping:
> -        xmlAssertIsomorphicContent(parseString(expected),
> parseString(out));
> +        xmlAssertIsomorphicContent(parseString(expected),
> parseString(out), true);

sounds about right. i've applied it (but can't test it since 1.3.0
refuses to run for me).

thanks for the spot

- robert


---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Mime
View raw message