Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JCache 1.1 TCK - org.jsr107.tck.event.CacheListenerTest passes, but assertion errors are in the log #12390

Closed
kwart opened this issue Feb 20, 2018 · 2 comments

Comments

@kwart
Copy link
Contributor

@kwart kwart commented Feb 20, 2018

The JCache 1.1 TCK passes for Hazelcast, but the log file contains assertion errors. It seems we experience 2 issues here:

  • the TCK handles the result wronly (the test should fail for Hazelcast) ;
  • and we have a JCache incompatibility in the CacheListener

https://hazelcast-l337.ci.cloudbees.com/view/JCache/job/JCache-1.1-TCK-branchparam-client-OS/4/console

11:59:16 java.lang.AssertionError: Old value should be available for CacheEntryEvent{eventType = REMOVED, isOldValueAvailable = false, value = Lucky, oldValue = null}
11:59:16 	at org.junit.Assert.fail(Assert.java:88)
11:59:16 	at org.junit.Assert.assertTrue(Assert.java:41)
11:59:16 	at org.jsr107.tck.testutil.CacheTestSupport$MyCacheEntryListener.assertOldValueForExpiredRemovedListener(CacheTestSupport.java:204)
11:59:16 	at org.jsr107.tck.testutil.CacheTestSupport$MyCacheEntryListener.onRemoved(CacheTestSupport.java:178)
11:59:16 	at org.jsr107.tck.event.CacheEntryListenerServer.runHandlers(CacheEntryListenerServer.java:151)
11:59:16 	at org.jsr107.tck.event.CacheEntryListenerServer.access$000(CacheEntryListenerServer.java:38)
11:59:16 	at org.jsr107.tck.event.CacheEntryListenerServer$CacheEntryEventOperationHandler.onProcess(CacheEntryListenerServer.java:120)
11:59:16 	at org.jsr107.tck.support.Server$ClientConnection.run(Server.java:310)
@vbekiaris
Copy link
Contributor

@vbekiaris vbekiaris commented Feb 20, 2018

TCK tests do not detect the failures because they assume listeners are executed on the same thread as the cache operations from which the events originate; since in Hazelcast events are published from separate event threads, the assertion failures / exceptions thrown from TCK's test listeners are ignored.

See also jsr107/jsr107tck#141

@vbekiaris
Copy link
Contributor

@vbekiaris vbekiaris commented Mar 10, 2018

Closing as fix #12385 has been merged and the TCK issue is separately tracked on jsr107 repository.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants
You can’t perform that action at this time.