nastra commented on code in PR #7370:
URL: https://github.com/apache/iceberg/pull/7370#discussion_r1177630077
##########
core/src/test/java/org/apache/iceberg/rest/TestRESTCatalog.java:
##########
@@ -113,34 +117,35 @@ public void createCatalog() throws Exception {
Map<String, String> contextHeaders =
ImmutableMap.of("Authorization", "Bearer
client-credentials-token:sub=user");
- RESTCatalogAdapter adaptor =
- new RESTCatalogAdapter(backendCatalog) {
- @Override
- public <T extends RESTResponse> T execute(
- RESTCatalogAdapter.HTTPMethod method,
- String path,
- Map<String, String> queryParams,
- Object body,
- Class<T> responseType,
- Map<String, String> headers,
- Consumer<ErrorResponse> errorHandler) {
- // this doesn't use a Mockito spy because this is used for catalog
tests, which have
- // different method calls
- if (!"v1/oauth/tokens".equals(path)) {
- if ("v1/config".equals(path)) {
- assertThat(headers).containsAllEntriesOf(catalogHeaders);
- } else {
- assertThat(headers).containsAllEntriesOf(contextHeaders);
+ adaptor =
+ Mockito.spy(
Review Comment:
this is only wrapping the `RESTCatalogAdapter` in a `Mockito.spy()` call
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]