I understand, so either change the checker (as i sugested) or change the expected result in the testcase. Op 10 jul. 2013 15:37 schreef "Dharmesh Kakadia" <dhkaka...@gmail.com> het volgende:
> @chip and @Daan Thanks for the reply. > > I think there is some misunderstanding. The test case is not written by me. > It is failing on an already existing test case after I did refactoring, > which is why I am worried. > > Thanks, > Dharmesh > > > On Wed, Jul 10, 2013 at 6:55 PM, Chip Childers <chip.child...@sungard.com > >wrote: > > > On Wed, Jul 10, 2013 at 03:01:35PM +0200, Daan Hoogland wrote: > > > I would not bother to look at it, if I were your, Dharmesh. Find a good > > > lightweigth xmlunit-like tool or another xml comaparison tool to do > the > > > checking. parsers and dom generators can do whatever they like with > > > attribute order. I would say not with element order, but still trying > to > > > make the xml (un)marshalling do exactly what you want is not worth your > > > time. > > > > > > regards, > > > Daan > > > > +1 to what Daan says. The XML specification doesn't require any parsers > > to maintain the exact same text representation of the XML data after > > it's been parsed and subsequently dumped. It only has to be the same > > *data*. > > > > > > > > > > > > > > On Wed, Jul 10, 2013 at 8:11 AM, Dharmesh Kakadia <dhkaka...@gmail.com > > >wrote: > > > > > > > Hi, > > > > > > > > I am trying to re-factor com.cloud to org.apache. While doing so 2 > test > > > > cases in > > org.apache.hypervisor.kvm.resource.LibvirtComputingResourceTest > > > > are failing and after trying for 2 days I have no idea why. > > > > > > > > Output of build is here http://apaste.info/8Tio > > > > > > > > From the output its clear that both the xml strings in test are same, > > but > > > > the elemenets are in diffrent order and thus string comparision > fails. > > Can > > > > anyone point out why they are coming in different order ? > > > > > > > > Thanks, > > > > Dharmesh > > > > > > >