james-server-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Robert Burrell Donkin" <robertburrelldon...@gmail.com>
Subject Re: [JSieve] Sporadic Mysterious Exceptions
Date Thu, 09 Aug 2007 19:08:06 GMT
On 8/9/07, Stefano Bagnara <apache@bago.org> wrote:
> Robert Burrell Donkin ha scritto:
> > On 8/9/07, Stefano Bagnara <apache@bago.org> wrote:

<snip>

> >> Forgot to say that if this is the case it should be pretty easy to
> >> create a test case to prove it.
> >
> > how would you approach the management of the multiple threads?
>
> I'm writing the code in thunderbird, so forget syntax and other
> problems. Hope you get the idea:
>
> void testIssue() {
> ConditionManager instance1 = ConditionManager.getInstance();
>
> Thread otherThread = new Thread() {
>         public void run() {
>                 ConditionManager.resetInstance();
>         }
> }.start();
>
> otherThread.join();
>
> assertEquals(instance1, ConditionManager.getInstance());
> }

thanks

you're right - it was easy :-)

- robert

---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org


Mime
View raw message