snazy commented on code in PR #2375: URL: https://github.com/apache/polaris/pull/2375#discussion_r2282201615
########## gradle/libs.versions.toml: ########## @@ -22,6 +22,7 @@ checkstyle = "10.25.0" hadoop = "3.4.1" iceberg = "1.9.2" # Ensure to update the iceberg version in regtests to keep regtests up-to-date quarkus = "3.25.0" +s3mock = "4.7.0" Review Comment: The change's not needed. There's only one usage, let's keep that one there. ########## integration-tests/src/main/java/org/apache/polaris/service/it/env/S3MockProvider.java: ########## @@ -0,0 +1,79 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.apache.polaris.service.it.env; + +import com.adobe.testing.s3mock.testcontainers.S3MockContainer; +import java.util.Map; + +/** + * Provides a shared S3Mock container instance for integration tests. + * + * <p>This utility class ensures that both PolarisSparkIntegrationTestBase and SparkIntegrationBase + * use the same S3Mock container configuration, avoiding duplication and ensuring consistency. + * + * <p>The container is configured with: + * + * <ul> + * <li>S3Mock version determined by {@link IntegrationTestsHelper#getS3MockVersion()} + * <li>Initial buckets as specified by the caller + * <li>Standard S3 configuration properties for testing + * </ul> + */ +public final class S3MockProvider { + + private S3MockProvider() { + // Generic utility class + } + + /** + * Creates a new S3MockContainer instance with standard test configuration. + * + * @param bucketNames comma-separated list of bucket names to create initially + * @return configured S3MockContainer instance + */ + public static S3MockContainer createContainerWithBuckets(String bucketNames) { + return new S3MockContainer(IntegrationTestsHelper.getS3MockVersion()) Review Comment: There's no real guarantee that the container image's at the same version as the Maven dependency. Should use `ContainerSpecHelper` instead. -- 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