]
Anna Manukyan commented on ISPN-2497:
-------------------------------------
From my point of view, it is fine to mark the constructor as private,
because anyway it is not possible to use it from outside and it only creates confusion.
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/te...
(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: