Sorry for the delay.  Shouldn't we fix the underlying problem, though?

On Fri, Oct 17, 2008 at 1:49 PM, Freeland Abbott <[EMAIL PROTECTED]
> wrote:

> Scott, can you review-or-delegate both this and my earlier "review request:
> JUnit hang"
> I just sent a patch up to block sending a "bad Test" to the client (i.e. to
> fail early if the test is unnamed), but that led me to thinking about the
> more general how-not-to-hang-on-unspecified-error case.
> We send the test to the client, it reports results, and if that fails (i.e.
> because something's broke on the server), the client retries more or less
> indefinitely.  There's a timeout thread, of course, but that works by
> reporting a timeout result... and so if the server can't record the result
> (my unnamed test had that effect, for example), then the timeout-report also
> gets retried, etc.
>
> This is a very corner case, and (I claim) not worth a whole lot of effort
> to close, but we really ought to shutdown somehow, and send a message (as it
> is, you can at least see server exceptions if you're -logLevel ALL, but in
> default cases it just hangs silently).  The issue is that we're in the RPC
> handling of the client's result, so anything we throw gets caught and sent
> back to the client, and the client needs to be stopped anyway.  Being unable
> to trust the server side framework (if I could trust it, we wouldn't have
> gotten an exception!), I couldn't think of any way to get out gracefully
> without more work than I thought it was worth, so ultimately I'm just
> dumping output and calling System.exit().  A bit unfriendly to pull the rug
> out from under JUnit, and I fear it still leaves the client dangling, but
> again this is a squirrelly error case that I (because of my "front door"
> closure) don't actually know how to trigger... I just wanted us not to hang
> silently.  Any suggestions on improvement are welcome!
>
>
> Oh--if you want to test it, just make a test suite like so:
>
> import junit.framework.Test;
> import junit.framework.TestSuite;
>
> public class AllTests {
>   public static Test suite() {
>     TestSuite suite = new TestSuite();
>     suite.addTest(new AnyGwtTestCaseYouLike());  // call ctor, not class
> literal: oops!
>     return suite;
>   }
> }
>
>
>
> (N.B. it looks like, in the class-literal processing, JUnit Tests contain
> TestCases, and TestCases are what get made from each testable method.  Has
> GWTTestCase been the wrong abstraction all this while, and should have been
> GWTTest??  Not that I propose changing it now....)
>
>

--~--~---------~--~----~------------~-------~--~----~
http://groups.google.com/group/Google-Web-Toolkit-Contributors
-~----------~----~----~----~------~----~------~--~---

Attachment: junit-cantrecord-r3876.patch
Description: Binary data

Reply via email to