-
Notifications
You must be signed in to change notification settings - Fork 25
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
Customizations may implement Closeable - TCK tests missing #100
Comments
All customization implementations in the TCK depend on It seems that the tear down code of the various tests in the TCK is fairly consistent. It first closes the cache and after that stops the server part for the customization. E.g. the
=> The lifecycle of a cache is managed properly, but the close method of the customization This means the following change would make sense:
This way we check consistently that all cache implementations call For distributed environments there may be arguments for:
All in all, I think it is safe and necessary to assume that after the last connected application closed |
The approach seems viable. Current findings:
|
I verified the change with the jsr107-test-zoo, to see how it affects existing implementations:
All other tested implementations (do not support calling Decision: We could drop the requirement from the Spec or we can extend the TCK to test it correctly. Since it is implemented by the RI and some of the existing implementations, I vote for extending the TCK. |
…mmit adds author), closes jsr107#100
Pull request for RI is ready, fixing the ClassCastException Outline of the changeAll TCK customizations implment now Closeable. The client/server code in the TCK is extended so the client (which is the instantiated customization by the cache implementation) sends a close operation to the server, when the The server checks that all client connections are closed correctly when it receives the close. If this is not the case an Since this is a cross cutting concern there is no extra test that checks the semantics. It is checked all the time an required by the client/server code now. If a cache is not implementing Closeable support, all tests addressing loaders, writers, expiry policy and entry listeners will therefore fail. Some more rationale: see second comment above. In case the customization is not closed a warning is logged with the open connections and an exception is thrown:
|
…mmit adds author), closes jsr107#100
On the Java Doc of
Cache.close()
this is specified:I do have a 100% TCK compatible implementation that is not supporting this.
Resource management and lifecycle is an important issue. A TCK test should be added.
The text was updated successfully, but these errors were encountered: