nastra commented on code in PR #11992:
URL: https://github.com/apache/iceberg/pull/11992#discussion_r1922256503


##########
core/src/test/java/org/apache/iceberg/rest/TestRESTCatalog.java:
##########
@@ -373,39 +366,29 @@ public void testCatalogCredentialNoOauth2ServerUri() {
     // no token or credential for catalog token exchange
     Mockito.verify(adapter)
         .execute(
-            eq(HTTPMethod.POST),
-            eq("v1/oauth/tokens"),
-            any(),
-            any(),
+            reqMatcher(HTTPMethod.POST, "v1/oauth/tokens", Map.of()),
             eq(OAuthTokenResponse.class),
-            eq(emptyHeaders),
+            any(),
             any());
     // no token or credential for config
     Mockito.verify(adapter)
         .execute(
-            eq(HTTPMethod.GET),
-            eq("v1/config"),
-            any(),
-            any(),
+            reqMatcher(HTTPMethod.GET, "v1/config", catalogHeaders),
             eq(ConfigResponse.class),
-            eq(catalogHeaders),
+            any(),
             any());
     // use the catalog token for all interactions
     Mockito.verify(adapter)
         .execute(
-            eq(HTTPMethod.HEAD),
-            eq("v1/namespaces/ns/tables/table"),
+            reqMatcher(HTTPMethod.HEAD, "v1/namespaces/ns/tables/table", 
catalogHeaders),
             any(),
             any(),
-            any(),
-            eq(catalogHeaders),
             any());
   }
 
   @ParameterizedTest
   @ValueSource(strings = {"v1/oauth/tokens", "https://auth-server.com/token"})
   public void testCatalogCredential(String oauth2ServerUri) {
-    Map<String, String> emptyHeaders = ImmutableMap.of();

Review Comment:
   same as above



-- 
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: issues-unsubscr...@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@iceberg.apache.org
For additional commands, e-mail: issues-h...@iceberg.apache.org

Reply via email to