[infinispan-issues] [JBoss JIRA] (ISPN-2497) Test for DistributedExecutionCompletionService hangs, if instantiation is done by passing queue
Anna Manukyan (JIRA)
jira-events at lists.jboss.org
Mon Nov 12 10:57:18 EST 2012
Anna Manukyan created ISPN-2497:
-----------------------------------
Summary: Test for DistributedExecutionCompletionService hangs, if instantiation is done by passing queue
Key: ISPN-2497
URL: https://issues.jboss.org/browse/ISPN-2497
Project: Infinispan
Issue Type: Bug
Components: Distributed Execution and Map/Reduce
Reporter: Anna Manukyan
Assignee: Vladimir Blagojevic
Hi,
during writing tests for DistributedExecutionCompletionService, the following issue raised:
I'm creating DistributedExecutionCompletionService with constructor
protected DistributedExecutionCompletionService(DistributedExecutorService executor, BlockingQueue<NotifyingFuture<V>> completionQueue, QueueingListener listener)
the constructor is protected, and my test is located in the same package.
As a completionQueue I'm passing ArrayBlockingQueue, and as a listener I'm passing my created QueueingListener instance.
When I submit simple callable to the service which just should return 1, and then call take() method of the completion service, the suite hangs. I've added some log for finding out whether the task is executed and listener is notified, and yes - the listener is notified and the queue is filled with the completed future task. But the take() method hangs and doesn't return the value.
If I use poll() instead of take(), and poll() the completed task after waiting for some time, the returned value is null, although it is already in the completion queue.
The test reproducing the issue is:
https://github.com/andyuk1986/infinispan/blob/DIST_EXEC_TESTS/core/src/test/java/org/infinispan/distexec/DistributedExecutionCompletionTest.java (testBasicInvocationWithBlockingQueueAndListener()).
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the infinispan-issues
mailing list