adnanhemani commented on code in PR #1604: URL: https://github.com/apache/polaris/pull/1604#discussion_r2100981589
########## 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: TIL this exists in AssertJ :) Thanks @dimas-b - pushed changes with this. PTAL! -- 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