Uploaded image for project: 'Infinispan'
  1. Infinispan
  2. ISPN-2496

Test for DistributedExecutionCompletionService hangs, if instantiation is done using PriorityBlockingQueue

    XMLWordPrintable

Details

    Description

      Hi,

      while writing tests for DistributedExecutionCompletionService, the following issue arrised:

      I'm creating DistributedExecutionCompletionService with constructor:
      DistributedExecutionCompletionService(DistributedExecutorService executor, BlockingQueue<NotifyingFuture<V>> completionQueue)

      If I'm passing as a completionQueue instance of ArrayBlockingQueue, then everything works properly. But if as a completionQueue I'm passing instance of PriorityBlockingQueue, then the test hangs.

      It hangs on line 61 of DistributedExecutionCompletionService:
      completionQueue.add((NotifyingFuture<V>)future);

      You can find the test reproducing the issue here:
      https://github.com/andyuk1986/infinispan/blob/DIST_EXEC_TESTS/core/src/test/java/org/infinispan/distexec/DistributedExecutionCompletionTest.java (testBasicInvocationWithBlockingQueue()).

      Attachments

        Activity

          People

            vblagoje Vladimir Blagojevic (Inactive)
            amanukya@redhat.com Anna Manukyan
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: