You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by Justin Edelson <ju...@gmail.com> on 2010/04/13 15:11:18 UTC

Re: "flushing" the event queue

On 4/13/10 4:27 AM, Bertrand Delacretaz wrote:
> Hi Justin,
> 
> On Mon, Apr 12, 2010 at 11:08 PM, Justin Edelson <ju...@helemus.com> wrote:
>> Is there any good way to flush the event queue in Jackrabbit 2? I'm
>> trying to do this in the context of an integration test...
> 
> The EventHelper class [1] in Sling's jcrinstall test suite allows you
> to wait until all events have been delivered, by creating a node and
> waiting for the corresponding events to arrive.
>
Thanks Bertrand. This should work.

Any objections to me moving this to commons.testing?

Justin


> It assumes that events are delivered in the order they were generated,
> which works so far with Jackrabbit - dunno if the JCR spec mandates
> that.
> 
> -Bertrand
> 
> [1] http://svn.apache.org/repos/asf/sling/trunk/installer/jcr/jcrinstall/src/test/java/org/apache/sling/jcr/jcrinstall/impl/EventHelper.java


Re: "flushing" the event queue

Posted by Bertrand Delacretaz <bd...@apache.org>.
On Tue, Apr 13, 2010 at 3:11 PM, Justin Edelson <ju...@gmail.com> wrote:
> On 4/13/10 4:27 AM, Bertrand Delacretaz wrote:
>> Hi Justin,
>>
>> On Mon, Apr 12, 2010 at 11:08 PM, Justin Edelson <ju...@helemus.com> wrote:
>>> Is there any good way to flush the event queue in Jackrabbit 2? I'm
>>> trying to do this in the context of an integration test...
>>
>> The EventHelper class [1] in Sling's jcrinstall test suite allows you
>> to wait until all events have been delivered, by creating a node and
>> waiting for the corresponding events to arrive.
>>
> Thanks Bertrand. This should work.
>
> Any objections to me moving this to commons.testing?

Feel free, sounds like the right thing to do.
-Bertrand