thread-safety (was: related javascript files not fetched)

<[email protected]> Tue, 18 Aug 2009 13:20:34 -0500
Newsgroups gmane.comp.web.httpunit.devel
Message-ID <047619DE22807D4192B0B9EB64E45CC12485676952@MSGCMSV21024.ent.wfb.bank.corp>
One more thing: HttpUnitOptions.getScriptErrorMessages()
is not at all friendly if you are running the tests
multi-threaded.  It would be much better if these
were stored on the WebConversation or WebClient.
Also the settings (setExceptionsThrownOnScriptError,
setExceptionsThrownOnErrorStatus, etc.) should be on
the WC if possible.

Thanks,
Dan

> -----Original Message-----
> From: Lipofsky, Dan
> Sent: Tuesday, August 18, 2009 11:15 AM
> To: Discussion of use and development of HttpUnit
> Cc: '[email protected]'
> Subject: RE: [Httpunit-develop] related javascript files not fetched
> 
> Thank you for this fix.
> I have something else to report for this.
> 
> HttpUnitOptions.setExceptionsThrownOnScriptError(...)
> sets the behavior of exceptions versus messages.
> 
> But HttpUnitOptions.setExceptionsThrownOnErrorStatus(...)
> also affects the behavior in ways that I don't think it should.
> 
> If I set
>    setExceptionsThrownOnErrorStatus(true)
> I get
>    "? failed: com.meterware.httpunit.ScriptException:".
> There is no exception message at all!
> (this I can reproduce in the unit test by changing
> the setting of setExceptionsThrownOnErrorStatus in that test)
> 
> If I set
>    setExceptionsThrownOnErrorStatus(false)
> It sets the entire response body as the exception message, like this:
>    "? failed: com.meterware.httpunit.ScriptException: <!DOCTYPE HTML
> PUBLIC "-//W3C//DTD HTML 4.0 Draft//EN">
> <HTML>
> <HEAD>
> <TITLE>Error 404--Not Found</TITLE>
> <META NAME="GENERATOR" CONTENT="WebLogic Server">
> </HEAD>
> <BODY bgcolor="white">
> ..."
> 
> (This may be specific to the app server I am hitting (WebLogic 10.3),
> but it would be preferable for the exception to have the simple "unable
> to find" message in all cases)
> 
> Thanks,
> Dan
> 
> 
> Wolfgang Fahl wrote:
> > But we still would like to know if such a condition was met.
> > Subversion revision 1036 has the change (and 1037 a modified
> > release notes with acknowledgments to your support):
> >
> http://httpunit.svn.sourceforge.net/viewvc/httpunit?view=rev&revision=1
> 036


------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july