On Wed, May 29, 2013 at 4:50 PM, Pedro Ruivo <pedro@infinispan.org> wrote:
Hi all,

//related to https://issues.jboss.org/browse/ISPN-3100

In here [1] I've added three simple tests to the CARD logic with the
ResponseFilter.

#1 testResponses() => tests if all the responses are returned. This test
is failing because the FutureCollactor only returns the last response.

*question* is this the desired behaviour or is it a bug (and this test
is incorrect)?


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.
 

#2 testTimeout() => tests the timeout when a ResponseFilter is used. It
sets the timeout to 1000 milliseconds and sends a command that sleeps
for 5000 millisecond before reply. This test is failing because no
TimeoutException was thrown (as expected). That's why I've created
ISPN-3100.

*question* is the desired behaviour to wait infinitely? If yes, then
ISPN-3100 is invalid.


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.

 
#3 testTimeoutWithoutFilter() => tests the timeout without a filter.
It's working correctly!

Thanks!

Cheers,
Pedro

[1]
https://github.com/pruivo/infinispan/commit/1fc26d740b773bf3864298615f61ca57b964d9cf#diff-0
_______________________________________________
infinispan-dev mailing list
infinispan-dev@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/infinispan-dev