It looks like this is an artifact of println rather than XMLUnit: when I add 
this to the end of my test, it triggers ok:

        System.out.println("@@@");
        //napMilliSeconds(2000);
        Assert.fail("Should fail here.");

With the 'nap', all the prints appear, but in any case the assert is reached 
and fires.
I forgot to mention, this is within IntelliJ.

Thanks for looking,
Bill

From: Bill Ross [mailto:bill.r...@xoom.com]
Sent: Wednesday, October 23, 2013 11:31 AM
To: xmlunit-general@lists.sourceforge.net
Subject: [Xmlunit-general] Diff.similar() seems to cause thread to exit 50%+ of 
the time

I'm using XMLUnit 1.5/Java.

More often than not, the println below fails and the (testing) test ends with 
success without any more code being run:

            actualText = "<msg><uuid>0x00435A8C</uuid></msg>";             // 
debug
            expectedXmlString = "<msg><uuid>0x00435A8C</uuid></msg>";           
    // debug

                Diff myDiff = new 
Diff(XMLUnit.buildTestDocument(expectedXmlString), 
XMLUnit.buildTestDocument(actualText));
                myDiff.overrideElementQualifier(new 
RecursiveElementNameAndTextQualifier());
                if(differenceListener != null){
                    myDiff.overrideDifferenceListener(differenceListener);
                }
                System.out.println("@@@ similar: " + myDiff.similar());

If I slow it down in the debugger, it is more likely to succeed.
Same behavior without the DifferenceListener.

Any ideas? Same was seen in 1.3, upgrade didn't help.

Thanks,
Bill


---------------------------------------------------------------------------------

The information transmitted in this email is intended only for the person or 
entity to which it is addressed, and may contain material confidential to Xoom 
Corporation, and/or its subsidiary, buyindiaonline.com Inc.  Any review, 
retransmission, dissemination or other use of, or taking of any action in 
reliance upon, this information by persons or entities other than the intended 
recipient(s) is prohibited.   If you received this email in error, please 
contact the sender and delete the material from your files.


---------------------------------------------------------------------------------
The information transmitted in this email is intended only for the person or 
entity to which it is addressed, and may contain material confidential to Xoom 
Corporation, and/or its subsidiary, buyindiaonline.com Inc.  Any review, 
retransmission, dissemination or other use of, or taking of any action in 
reliance upon, this information by persons or entities other than the intended 
recipient(s) is prohibited.   If you received this email in error, please 
contact the sender and delete the material from your files.
------------------------------------------------------------------------------
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from 
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60135991&iu=/4140/ostg.clktrk
_______________________________________________
Xmlunit-general mailing list
Xmlunit-general@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/xmlunit-general

Reply via email to