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

AllClusterExecutorTest.testExecutorTriConsumerTimeoutException random failures

    XMLWordPrintable

Description

    When running tests in parallel, the remote request may complete before the thread that sent the request resumes. Because the scheduled executor is mocked to return null, this leads to a NullPointerException:

    09:43:41,995 ERROR (testng-Test:[]) [TestSuiteProgress] Test failed: org.infinispan.manager.AllClusterExecutorTest.testExecutorTriConsumerTimeoutException
    java.lang.NullPointerException: null
    	at org.infinispan.remoting.transport.AbstractRequest.setTimeoutFuture(AbstractRequest.java:94) ~[classes/:?]
    	at org.infinispan.remoting.transport.AbstractRequest.setTimeout(AbstractRequest.java:55) ~[classes/:?]
    	at org.infinispan.remoting.transport.jgroups.JGroupsTransport.invokeCommand(JGroupsTransport.java:831) ~[classes/:?]
    	at org.infinispan.manager.impl.AllClusterExecutor.submitConsumer(AllClusterExecutor.java:182) ~[classes/:?]
    	at org.infinispan.manager.ClusterExecutor.submitConsumer(ClusterExecutor.java:116) ~[classes/:?]
    	at org.infinispan.manager.Test$17.call(AllClusterExecutorTest.java:402) ~[test-classes/:?]
    	at org.infinispan.test.TestingUtil.withCacheManagers(TestingUtil.java:1601) ~[test-classes/:?]
    	at org.infinispan.manager.AllClusterExecutorTest.testExecutorTriConsumerTimeoutException(AllClusterExecutorTest.java:382) ~[test-classes/:?]
    

    The problem may be that the test calls Mockito.verify() from the consumer twice, once for each node, instead of doing it only on the remote node.

    Attachments

      Activity

        People

          dberinde@redhat.com Dan Berindei (Inactive)
          dberinde@redhat.com Dan Berindei (Inactive)
          Votes:
          0 Vote for this issue
          Watchers:
          1 Start watching this issue

          Dates

            Created:
            Updated:
            Resolved: