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

RemoteApplicationPublishedBridgeTest.testEventBridge random failures

XMLWordPrintable

      InfinispanApplicationPublishedBridgeTCK.testEventBridge

      Fails in remote randomly.

      java.lang.AssertionError: Expected 2 events of a class SessionCreatedEvent but found 1
      	at org.infinispan.spring.common.session.util.EventsWaiter.assertNumberOfEvents(EventsWaiter.java:28)
      	at org.infinispan.spring.common.session.InfinispanApplicationPublishedBridgeTCK.testEventBridge(InfinispanApplicationPublishedBridgeTCK.java:59)
      	at org.infinispan.spring.remote.session.RemoteApplicationPublishedBridgeTest.testEventBridge(RemoteApplicationPublishedBridgeTest.java:78)
      

      This failure is related to the fact that spring session API's have changed. Now to send an event to spring context we need to send the session object instead of the ID.
      In the case of this test, we safe two sessions and remove 1.
      After a while, we will verify if 2 creation events and 1 deletion event has been fired.
      If the creation and removal happens faster than the listener getting notified and retrieving the session object to send the notification to spring, the creation event won't be fired ( (remote get will be null in this case), so we will have 1 event instead of two.

      The test must be changed to meet this case.

              karestig@redhat.com Katia Aresti
              karestig@redhat.com Katia Aresti
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: