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"));
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: [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]