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

TCK calls getCacheNames() on a closed CacheManager #342

Closed
christian-esken opened this issue Apr 28, 2016 · 4 comments
Closed

TCK calls getCacheNames() on a closed CacheManager #342

christian-esken opened this issue Apr 28, 2016 · 4 comments

Comments

@christian-esken
Copy link

The test org.jsr107.tck.CacheManagerTest.close_cachesEmpty() closes a CacheManager and then calls getCacheNames() on the closed CacheManager. This is not allowed according to the JSR107 specification:

Once closed any attempt to use an operational method on a closed CacheManager or any of the Caches it was managing will throw an IllegalStateException. The operational methods on CacheManager are:
createCache
...
getCacheNames

As I interpret this, a compliant implementation MUST throw IllegalStateException. In that case either the test or the specification should be amended.

@test
public void close_cachesEmpty() {
[...]
cacheManager.close();
assertFalse(cacheManager.getCacheNames().iterator().hasNext());
// ^^^^^^^ getCacheNames() after close() ^^^^^^^^
}

@cruftex
Copy link
Member

cruftex commented Apr 28, 2016

Yes. This duplicates:
jsr107/jsr107tck#87

There is already a TCK pull request for it.

@christian-esken
Copy link
Author

Thanks for the quick reply. My search didn't yield that, as I only searched in jsr107spec and not jsr107tck. :-)
If there is a pull request already, I will not create another from trivago/jsr107tck@cb34de9

Should I close this duplicate bug?

@cruftex
Copy link
Member

cruftex commented Apr 28, 2016

Yes, please close. I don't think that we should really alter the Spec here.

The only reason to alter the Spec would be to comply with all the existing implementations ;)

@christian-esken
Copy link
Author

Closing as duplicate. Further comments should go to jsr107/jsr107tck#87

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

No branches or pull requests

2 participants