]
Pedro Ruivo updated ISPN-4903:
------------------------------
Fix Version/s: 8.0.0.Final
(was: 7.2.0.Final)
ServerFailureRetrySingleOwnerTest doesn't actually test client
retry
--------------------------------------------------------------------
Key: ISPN-4903
URL:
https://issues.jboss.org/browse/ISPN-4903
Project: Infinispan
Issue Type: Bug
Components: Server, Test Suite - Server
Affects Versions: 7.0.0.CR2
Reporter: Dan Berindei
Fix For: 8.0.0.Final
Attachments: ServerFailureRetrySingleOwnerTest.java
With {{useSynchronization = true}} (the default, before ISPN-4166 is integrated), the
{{SuspectException}} thrown by the listener is swallowed by the transaction manager and
the client doesn't retry. The test doesn't pick that up because the exception is
thrown _after_ the entry was updated in the data container (a regular SuspectException
would be thrown before).
I changed the configuration to {{useSynchronization = false}}, but it didn't work
because the {{SuspectException}} is wrapped in a {{CacheListenerException}}, so the client
throws an exception instead of retrying. I also changed the test to use an interceptor
instead of a listener, but then I got a {{ClassCastException}}:
{noformat}
Caused by: java.lang.ClassCastException: [B cannot be cast to
org.infinispan.container.entries.CacheEntry
at org.infinispan.cache.impl.CacheImpl.getCacheEntry(CacheImpl.java:424)
at org.infinispan.cache.impl.CacheImpl.getCacheEntry(CacheImpl.java:429)
at org.infinispan.server.hotrod.Decoder2x$.customReadKey(Decoder2x.scala:285)
at org.infinispan.server.hotrod.HotRodDecoder.customDecodeKey(HotRodDecoder.scala:156)
at
org.infinispan.server.core.AbstractProtocolDecoder.org$infinispan$server$core$AbstractProtocolDecoder$$decodeKey(AbstractProtocolDecoder.scala:176)
at
org.infinispan.server.core.AbstractProtocolDecoder.decodeDispatch(AbstractProtocolDecoder.scala:71) ...
14 more
{noformat}