[rules-users] Rule compilation errors under heavy load
Hehl, Thomas
Thomas.Hehl at acs-inc.com
Mon Jul 16 07:53:57 EDT 2007
Couldn't you use yield() to generate a context-switch? It would only happen
in that spot, but should produce some good testing.
-----Original Message-----
From: rules-users-bounces at lists.jboss.org
[mailto:rules-users-bounces at lists.jboss.org] On Behalf Of Dean Jones
Sent: Monday, July 16, 2007 5:48 AM
To: Rules Users List
Subject: Re: [rules-users] Rule compilation errors under heavy load
On 7/14/07, Mark Proctor <mproctor at codehaus.org> wrote:
> We are going to need an integration test, to reproduce this, can you
> supply one?
>
Okay, I've just converted the simple test that I added earlier to a
Junit test. The test is not guaranteed to fail if there are thread
safety errors, just very likely to fail (don't know if this is
acceptable for you). Initially, I wrote a test which guaranteed that
calls to the addPackage() and getPackage() methods were interleaved by
different threads, but, annoyingly, this test passed. It seems that a
context-switch halfway through one of these methods is necessary to
provoke the problem (which is difficult to guarantee :-)
Dean.
More information about the rules-users
mailing list