nastra commented on code in PR #11577: URL: https://github.com/apache/iceberg/pull/11577#discussion_r1991000079
########## 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); + var policyMockedConstruction = mockConstruction(VendedAzureSasCredentialPolicy.class)) { + AzureProperties props = + new AzureProperties(ImmutableMap.of(ADLS_REFRESH_CREDENTIALS_ENDPOINT, "endpoint")); + assertThat(providerMockedConstruction.constructed()).hasSize(1); + var providerMock = providerMockedConstruction.constructed().get(0); + String sasToken = "random-token"; + + when(providerMock.credentialForAccount("account1")).thenReturn(sasToken); + DataLakeFileSystemClientBuilder clientBuilder = mock(DataLakeFileSystemClientBuilder.class); + props.applyClientConfiguration("account1", clientBuilder); + + var policyMock = policyMockedConstruction.constructed().get(0); Review Comment: instead of using `var` I think it's better to define the actual type here and everywhere else -- 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