dimas-b commented on code in PR #1604: URL: https://github.com/apache/polaris/pull/1604#discussion_r2097983082
########## polaris-core/src/test/java/org/apache/polaris/service/storage/StorageLocationTest.java: ########## @@ -18,18 +18,63 @@ */ package org.apache.polaris.service.storage; +import java.net.URISyntaxException; import org.apache.polaris.core.storage.StorageLocation; +import org.apache.polaris.core.storage.azure.AzureLocation; import org.assertj.core.api.Assertions; import org.junit.jupiter.api.Test; public class StorageLocationTest { @Test public void testOfDifferentPrefixes() { - StorageLocation StandardLocation = StorageLocation.of("file:///path/to/file"); + StorageLocation standardLocation = StorageLocation.of("file:///path/to/file"); StorageLocation slashLeadingLocation = StorageLocation.of("/path/to/file"); + StorageLocation manySlashLeadingLocation = StorageLocation.of("////////path/to/file"); StorageLocation fileSingleSlashLocation = StorageLocation.of("file:/path/to/file"); - Assertions.assertThat(slashLeadingLocation.equals(StandardLocation)).isTrue(); - Assertions.assertThat(fileSingleSlashLocation.equals(StandardLocation)).isTrue(); + StorageLocation fileTooManySlashesLocation = StorageLocation.of("file://///////path/to/file"); + Assertions.assertThat(slashLeadingLocation.equals(standardLocation)).isTrue(); + Assertions.assertThat(manySlashLeadingLocation.equals(standardLocation)).isTrue(); + Assertions.assertThat(fileSingleSlashLocation.equals(standardLocation)).isTrue(); + Assertions.assertThat(fileTooManySlashesLocation.equals(standardLocation)).isTrue(); + Assertions.assertThat(standardLocation instanceof AzureLocation).isFalse(); Review Comment: What is the meaning of this assertion? Is it not preferable to assert exact expected type rather that asserting what the type is _not_? -- 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...@polaris.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org