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: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 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 <[EMAIL PROTECTED]> 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. _______________________________________________ rules-users mailing list [email protected] https://lists.jboss.org/mailman/listinfo/rules-users
