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


##########
azure/src/test/java/org/apache/iceberg/azure/AzurePropertiesTest.java:
##########
@@ -71,6 +78,49 @@ public void testWithSasToken() {
     verify(clientBuilder, 
never()).credential(any(StorageSharedKeyCredential.class));
   }
 
+  @Test
+  public void testWithRefreshCredentialsEndpoint() {
+    try (var providerMockedConstruction = 
mockConstruction(VendedAdlsCredentialProvider.class);

Review Comment:
   I feel like this test can be simplified to 
   ```
   @Test
     public void testWithRefreshCredentialsEndpoint() {
       AzureProperties props =
           new 
AzureProperties(ImmutableMap.of(ADLS_REFRESH_CREDENTIALS_ENDPOINT, "endpoint"));
   
       VendedAdlsCredentialProvider provider = 
mock(VendedAdlsCredentialProvider.class);
       
when(provider.credentialForAccount("account1")).thenReturn("random-token");
       DataLakeFileSystemClientBuilder clientBuilder = 
mock(DataLakeFileSystemClientBuilder.class);
       props.applyClientConfiguration("account1", clientBuilder);
   
       verify(clientBuilder, never()).credential(any(AzureSasCredential.class));
       verify(clientBuilder, never()).sasToken(any());
       verify(clientBuilder, 
never()).credential(any(StorageSharedKeyCredential.class));
       verify(clientBuilder, 
times(1)).addPolicy(any(VendedAzureSasCredentialPolicy.class));
     }
   ```
   
   Can you please also simplify the other test in a similar manner?



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