-
Notifications
You must be signed in to change notification settings - Fork 0
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
Fix 4/6 problems in JCache1.1.0 TCK #11
base: master
Are you sure you want to change the base?
Conversation
@@ -453,7 +453,7 @@ | |||
<artifactItem> | |||
<groupId>javax.cache</groupId> | |||
<artifactId>app-domain</artifactId> | |||
<version>${javax.cache.tck.version}</version> | |||
<version>${javax.cache.version}</version> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A simple bug in current pom file, which is hidden in master. You can restore this change and will see the problem.
@@ -78,7 +78,7 @@ | |||
<jackson2.version>2.6.5</jackson2.version> | |||
<javassist.version>3.20.0-GA</javassist.version> | |||
<javax.cache.bundle.version>1.0.0_1</javax.cache.bundle.version> | |||
<javax.cache.tck.version>1.0.1</javax.cache.tck.version> | |||
<javax.cache.tck.version>1.1.0</javax.cache.tck.version> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Update TCK version to 1.1.0
cctx.cache().metrics0().onRead(oldVal != null); | ||
} | ||
needVal) | ||
cctx.cache().metrics0().onRead(oldVal != null); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fix problem with CacheMBStatisticsBeanTest.testPutIfAbsent
jsr107/jsr107tck#124
@@ -251,7 +251,7 @@ | |||
|
|||
/** {@inheritDoc} */ | |||
@Override public void clear() { | |||
throw new UnsupportedOperationException("Cluster metrics can't be cleared. Use local metrics clear instead."); | |||
cache.metrics.clear(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fix problem with CacheMBStatisticsBeanTest.testClear
.
jsr107/jsr107tck#101
@@ -258,8 +250,7 @@ public CacheManager(URI uri, CachingProvider cachingProvider, ClassLoader clsLdr | |||
|
|||
try { | |||
if (kernalGateway.getState() != GridKernalState.STARTED) | |||
return Collections.emptySet(); // javadoc of #getCacheNames() says that IllegalStateException should be | |||
// thrown but CacheManagerTest.close_cachesEmpty() require empty collection. | |||
throw new IllegalStateException(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fix problem with CacheManagerTest.close_cachesEmpty
jsr107/jsr107tck#87
https://github.com/jsr107/RI/pull/49/files
@@ -221,14 +221,6 @@ public CacheManager(URI uri, CachingProvider cachingProvider, ClassLoader clsLdr | |||
try { | |||
IgniteCache<K, V> cache = getCache0(cacheName); | |||
|
|||
if (cache != null) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fix problem with CacheManagerTest.getUnsafeTypedCacheRequest
jsr107/jsr107spec#340
jsr107/jsr107tck#83
I have tested our current master with JCache TCK 1.1.0 fix some problems, and prepared following summary:
Summary
Total failed tests: 104.
A number of different problems: 6.
Problems which will break TCK 1.0.1 after fix: 2 (have tested).
Problem 1 (not done): Problems with
Closeable
objects fromFactory
.According to spec
Cache.close()
should clean up allCloseable
objects created by following factories:CacheLoader
,CacheWriter
,CacheEntryListener
,ExpiryPolicy
.And in TCK 1.0.1 there are no such tests. But in TCK 1.1.0 there are checks for it. And Ignite fails it because hasn't such functionality.
Closeable
objects created byFactory
which passed intoIgniteCache
, likeevictPlcFactory
,expiryPolicyFactory
,storeFactory
. I believe more experienced contributors will want to design it.List of test classes in TCK:
CacheListenerTest
CacheExpiryTest
CacheLoaderTest
CacheLoaderWithExpiryTest
CacheLoaderWithoutReadThroughTest
CacheLoaderWriterTest
CacheWriterTest
Problem 2 (done):
CacheManagerTest.close_cachesEmpty
Method
CacheManager.getCacheNames()
should throwIllegalStateException
in case whenCacheManager
is closed. But in TCK 1.0.1 testCacheManagerTest.close_cachesEmpty
expect empty list, which was incorrect according to spec.In TCK 1.1.0 test is fixed.
It was known problem, please see comments in
CacheManager#getCacheNames()
on current master.But we can't make this test pass in both versions of TCK.
Link: jsr107/jsr107tck#87
Failed tests: 1.
Changing in RI for example: https://github.com/jsr107/RI/pull/49/files
Break TCK for 1.0.1: Yes. New test expects
Exception
, but old test expects empty list.Fix trivial: Yes. See
CacheManager#getCacheNames()
.Problem 3 (done):
CacheMBStatisticsBeanTest.testClear
CacheStatisticsMXBean.clear()
was never tested. Now it is.Link: jsr107/jsr107tck#101
Failed tests: 1.
Changing in RI for example: ----
Break TCK for 1.0.1: No.
Fix trivial: Yes. See
CacheClusterMetricsMXBeanImpl#clear()
Problem 4 (not done):
CacheEntryEvent.getOldValue
should be availableLink:
Failed tests: 2.
List of tests:
CacheListenerTest.testFilteredListener
CacheListenerTest.testCacheEntryListener
Changing in RI for example: ----
Break TCK for 1.0.1: Should not.
Fix trivial: No. See
CacheContinuousQueryManager#existingEntries
. Need somehow restore old value from entry event. Required to redesign continuous query a bit. I believe more experienced contributors will want to design it.Problem 5 (done): CacheManagerTest.getUnsafeTypedCacheRequest
Link:
Failed tests: 1.
Changing in RI for example: ----
Break TCK for 1.0.1: No.
Fix trivial: Yes. See
CacheManager#getCache()
Problem 6 (done):
CacheMBStatisticsBeanTest.testPutIfAbsent
--putIfAbsent
doesn't update hit/miss statistics.Link: jsr107/jsr107tck#63
Failed tests: 1.
Changing in RI for example: ----
Break TCK for 1.0.1: Yes. New test expects 1, but old test expects 0 in the same situation.
Fix trivial: Yes. See
GridCacheMapEntry.innerUpdate()