]
William Burns updated ISPN-4513:
--------------------------------
Status: Pull Request Sent (was: Open)
Git Pull Request:
ProgrammaticCacheContainerTest.testSmallCache always fails on JDK8
------------------------------------------------------------------
Key: ISPN-4513
URL:
https://issues.jboss.org/browse/ISPN-4513
Project: Infinispan
Issue Type: Bug
Security Level: Public(Everyone can see)
Components: CDI Integration
Affects Versions: 7.0.0.Alpha4
Reporter: Dan Berindei
Assignee: William Burns
Labels: testsuite_stability
Fix For: 7.0.0.Alpha5
Attachments: ProgrammaticCacheContainerTest_pr_wburns_ISPN-4435_20140701.log.gz
CDI listeners are implemented via an adapter class that extends {{AbstractAdapter<T
extends Event>}}. For {{CacheStartedEvent}}, the base class defines a {{void fire(T
payload)}} method, and the adapter overrides it as {{void fire(CacheStartedEvent
payload)}}.
It appears that in JDK8 both these methods are returned by {{Class.getMethods()}}, and
the CDI listener ends up being called twice:
{noformat}
16:42:44,810 ERROR (testng-ProgrammaticCacheContainerTest:) [UnitTestTestNGListener] Test
testSmallCache(org.infinispan.cdi.test.cachemanager.embedded.programmatic.ProgrammaticCacheContainerTest)
failed.
java.lang.AssertionError: expected [1] but found [2]
at org.testng.Assert.fail(Assert.java:94)
at org.testng.Assert.failNotEquals(Assert.java:494)
at org.testng.Assert.assertEquals(Assert.java:123)
at org.testng.Assert.assertEquals(Assert.java:370)
at org.testng.Assert.assertEquals(Assert.java:380)
at
org.infinispan.cdi.test.cachemanager.embedded.programmatic.ProgrammaticCacheContainerTest.testSmallCache(ProgrammaticCacheContainerTest.java:39)
{noformat}