<div dir="ltr"><br><div class="gmail_extra"><br><br><div class="gmail_quote">On Wed, May 29, 2013 at 4:50 PM, Pedro Ruivo <span dir="ltr"><<a href="mailto:pedro@infinispan.org" target="_blank">pedro@infinispan.org</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hi all,<br>
<br>
//related to <a href="https://issues.jboss.org/browse/ISPN-3100" target="_blank">https://issues.jboss.org/browse/ISPN-3100</a><br>
<br>
In here [1] I've added three simple tests to the CARD logic with the<br>
ResponseFilter.<br>
<br>
#1 testResponses() => tests if all the responses are returned. This test<br>
is failing because the FutureCollactor only returns the last response.<br>
<br>
*question* is this the desired behaviour or is it a bug (and this test<br>
is incorrect)?<br>
<br></blockquote><div><br></div><div>I think it was intentional, because it only really had to work with ClusteredGetResponseValidityFilter at the time. But I'm all for changing it to return all the (validated) responses.<br>
</div><div> <br><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
#2 testTimeout() => tests the timeout when a ResponseFilter is used. It<br>
sets the timeout to 1000 milliseconds and sends a command that sleeps<br>
for 5000 millisecond before reply. This test is failing because no<br>
TimeoutException was thrown (as expected). That's why I've created<br>
ISPN-3100.<br>
<br>
*question* is the desired behaviour to wait infinitely? If yes, then<br>
ISPN-3100 is invalid.<br>
<br></blockquote><div><br></div><div>I'm pretty sure that's not intentional. FutureCollator.futureDone() should be called when a UnicastRequest finishes with a TimeoutException and it should decrement expectedResponses. When all the UnicastRequests are done, it should notify() the caller thread, which should throw a TimeoutException.<br>
<br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
#3 testTimeoutWithoutFilter() => tests the timeout without a filter.<br>
It's working correctly!<br>
<br>
Thanks!<br>
<br>
Cheers,<br>
Pedro<br>
<br>
[1]<br>
<a href="https://github.com/pruivo/infinispan/commit/1fc26d740b773bf3864298615f61ca57b964d9cf#diff-0" target="_blank">https://github.com/pruivo/infinispan/commit/1fc26d740b773bf3864298615f61ca57b964d9cf#diff-0</a><br>
_______________________________________________<br>
infinispan-dev mailing list<br>
<a href="mailto:infinispan-dev@lists.jboss.org">infinispan-dev@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/infinispan-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/infinispan-dev</a><br>
</blockquote></div><br></div></div>