You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cactus-user@jakarta.apache.org by "Boulatian, Misak" <mi...@vantra.com> on 2003/02/13 16:46:07 UTC

Re: failures and errors are reversed in cactus compared with juni t

Hi Paul,
 
I looked further at the source code for cactus.  I have found
incompatibility between junit 3.8.1 and cactus 1.4.1. In this new version of
junit a new exception was introduced called ComparisonFailure thrown when an
assertEquals(String, String, String) for strings fails (by the way
assertEquals with 3 string arguments is new and available for only junit
3.8.1). This class is a direct subclass of AssertionFailedError. Whenever
string comparison fails junit throws ComparisonFailure instead of
AssertionFailedError. In cactus source code for HttpURLConnection
doTest(WebRequest theRequest) method in class
org.apache.cactus.client.AbstractHttpClient the check is made for exception
class name instead of using 'instance of' operator. This causes string
comparisons with assertEquals(String, String, String) to be reversed and
reported as errors instead of failures as junit reports them.
 

Thanks,<?xml:namespace prefix = o ns =
"urn:schemas-microsoft-com:office:office" />

Misak M. Boulatian

 
 
 

RE: failures and errors are reversed in cactus compared with junit

Posted by Vincent Massol <vm...@octo.com>.
Thanks Misak for the bug report. We'll fix this incompatibility issue
ASAP. 

Thanks
-Vincent

PS: Patches are welcome :-)

> -----Original Message-----
> From: Boulatian, Misak [mailto:misak@vantra.com]
> Sent: 13 February 2003 16:46
> To: 'cactus-user@jakarta.apache.org'
> Subject: Re: failures and errors are reversed in cactus compared with
> junit
> 
> Hi Paul,
> 
> I looked further at the source code for cactus.  I have found
> incompatibility between junit 3.8.1 and cactus 1.4.1. In this new
version
> of
> junit a new exception was introduced called ComparisonFailure thrown
when
> an
> assertEquals(String, String, String) for strings fails (by the way
> assertEquals with 3 string arguments is new and available for only
junit
> 3.8.1). This class is a direct subclass of AssertionFailedError.
Whenever
> string comparison fails junit throws ComparisonFailure instead of
> AssertionFailedError. In cactus source code for HttpURLConnection
> doTest(WebRequest theRequest) method in class
> org.apache.cactus.client.AbstractHttpClient the check is made for
> exception
> class name instead of using 'instance of' operator. This causes string
> comparisons with assertEquals(String, String, String) to be reversed
and
> reported as errors instead of failures as junit reports them.
> 
> 
> Thanks,<?xml:namespace prefix = o ns =
> "urn:schemas-microsoft-com:office:office" />
> 
> Misak M. Boulatian
> 
> 
> 
>