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

Combined Nessie server+client for testing #7527

Merged
merged 1 commit into from Sep 25, 2023

Conversation

snazy
Copy link
Member

@snazy snazy commented Sep 20, 2023

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.

@snazy snazy force-pushed the combined-nessie-client-server branch from 6fc1f75 to 7cf6a0c Compare September 20, 2023 19:04

@Test
@NessieApiVersions(versions = {NessieApiVersion.V2})
public void testErrorsV2() throws Exception {
Copy link
Member Author

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

@snazy snazy marked this pull request as ready for review September 20, 2023 19:06
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.
@snazy snazy force-pushed the combined-nessie-client-server branch from 7cf6a0c to 78df51d Compare September 21, 2023 08:00
@snazy snazy requested a review from dimas-b September 22, 2023 09:34

// Optimistic cast...
@SuppressWarnings("unchecked")
API r = (API) new CombinedClientImpl(configResource, treeResource);
Copy link
Member

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

Comment on lines +178 to +179
createClientBuilder("Combined", null)
.asInstanceOf(CombinedClientBuilder.class)
Copy link
Member

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).

@snazy snazy merged commit 9463b47 into projectnessie:main Sep 25, 2023
17 checks passed
@snazy snazy deleted the combined-nessie-client-server branch September 25, 2023 09:02
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

Successfully merging this pull request may close these issues.

None yet

2 participants