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

Missing integration configuration tests #113

Closed
ljacomet opened this issue Jul 13, 2016 · 3 comments
Closed

Missing integration configuration tests #113

ljacomet opened this issue Jul 13, 2016 · 3 comments

Comments

@ljacomet
Copy link

read-through and CacheLoader factory

In section 7.2 of the spec, it says (page 64):

Read-Through caching is set at configuration time by calling setReadThrough(boolean
isReadThrough) on MutableConfiguration. A CacheLoader Factory must also have been
defined.

There is currently no TCK test enforcing the must in that last sentence.

write-through and CacheWriter factory

In section 7.3 of the spec, it says (page 66):

Write-Through caching is set at configuration time by calling setWriteThrough(boolean
isWriteThrough) on MutableConfiguration. A CacheWriter Factory must also have
been defined.

Again, there is currently no TCK test enforcing the must in the last sentence.

Note that per javadoc of CacheManager.createCache(String, Configuration), the expected exception is an IllegalArgumentException.

@cruftex
Copy link
Member

cruftex commented Oct 18, 2016

The Spec doesn't say something about the exact semantics of a missing configuration. Adding a TCK test would require a more precise Spec first.

See my comment on this here:
#69 (comment)

@cruftex
Copy link
Member

cruftex commented Dec 14, 2016

Just a general note. The Spec says:

A CacheWriter Factory must also have been defined.

That kind of wording is has various ways to be interpreted. Usually, the Spec defines what a cache implementation "must do". Here it defines what a cache client "must do" and leaves the semantics of the cache implementation undefined.

If implementations should have the option to react different on error conditions / miss configuration a better wording would be:

An ambiguous situation exists when the write through is set to true but no cache writer is defined. The outcome is implementation specific.

@cruftex
Copy link
Member

cruftex commented Dec 14, 2016

This this, since a duplicate.

@cruftex cruftex closed this as completed Dec 14, 2016
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