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
Combined Nessie server+client for testing #7527
Conversation
6fc1f75
to
7cf6a0c
Compare
|
||
@Test | ||
@NessieApiVersions(versions = {NessieApiVersion.V2}) | ||
public void testErrorsV2() throws Exception { |
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.
This test exercises the "exception mapping" in the added client impl
Introduce a new `:nessie-combined-cs` module (under `testing/`) providing a Nessie-API (v2) client that directly calls the service implementations, using the v2 REST endpoint implementations. This eliminates the need for a Jersey/Weld based Nessie endpoint for testing purposes. The implementation in this PR (currently) provides only a new-storage model in-memory backend.
7cf6a0c
to
78df51d
Compare
|
||
// Optimistic cast... | ||
@SuppressWarnings("unchecked") | ||
API r = (API) new CombinedClientImpl(configResource, treeResource); |
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.
nit: apiContract.cast(..)
instead of @SuppressWarnings
createClientBuilder("Combined", null) | ||
.asInstanceOf(CombinedClientBuilder.class) |
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.
Could we somehow "combine" these calls... something like createClientBuilder(Class<T> builder)
... the name looks redundant in this context (separate PR, of course, if you agree).
Introduce a new
:nessie-combined-cs
module (undertesting/
) providing a Nessie-API (v2) client that directly calls the service implementations, using the v2 REST endpoint implementations. This eliminates the need for a Jersey/Weld based Nessie endpoint for testing purposes. The implementation in this PR (currently) provides only a new-storage model in-memory backend.