diff --git a/servers/quarkus-server/src/intTest/java/org/projectnessie/server/ITBearerAuthentication.java b/servers/quarkus-server/src/intTest/java/org/projectnessie/server/ITBearerAuthentication.java index 7b88b5940f3..fa4e805d904 100644 --- a/servers/quarkus-server/src/intTest/java/org/projectnessie/server/ITBearerAuthentication.java +++ b/servers/quarkus-server/src/intTest/java/org/projectnessie/server/ITBearerAuthentication.java @@ -16,6 +16,7 @@ package org.projectnessie.server; import com.google.common.collect.ImmutableMap; +import io.quarkus.test.common.TestResourceScope; import io.quarkus.test.common.WithTestResource; import io.quarkus.test.junit.QuarkusIntegrationTest; import io.quarkus.test.junit.QuarkusTestProfile; @@ -26,7 +27,9 @@ import org.projectnessie.server.authn.AuthenticationEnabledProfile; @QuarkusIntegrationTest -@WithTestResource(KeycloakTestResourceLifecycleManager.class) +@WithTestResource( + scope = TestResourceScope.RESTRICTED_TO_CLASS, + value = KeycloakTestResourceLifecycleManager.class) @TestProfile(value = ITBearerAuthentication.Profile.class) public class ITBearerAuthentication extends AbstractBearerAuthentication { diff --git a/servers/quarkus-server/src/intTest/java/org/projectnessie/server/ITOAuth2Authentication.java b/servers/quarkus-server/src/intTest/java/org/projectnessie/server/ITOAuth2Authentication.java index 358ea831657..1b693a53f0a 100644 --- a/servers/quarkus-server/src/intTest/java/org/projectnessie/server/ITOAuth2Authentication.java +++ b/servers/quarkus-server/src/intTest/java/org/projectnessie/server/ITOAuth2Authentication.java @@ -17,6 +17,7 @@ import com.google.common.collect.ImmutableMap; import io.quarkus.test.common.ResourceArg; +import io.quarkus.test.common.TestResourceScope; import io.quarkus.test.common.WithTestResource; import io.quarkus.test.junit.QuarkusIntegrationTest; import io.quarkus.test.junit.QuarkusTestProfile; @@ -35,6 +36,7 @@ @QuarkusIntegrationTest @WithTestResource( + scope = TestResourceScope.RESTRICTED_TO_CLASS, value = KeycloakTestResourceLifecycleManager.class, initArgs = @ResourceArg( diff --git a/servers/quarkus-server/src/intTest/java/org/projectnessie/server/catalog/adls/ITAdlsIcebergCatalog.java b/servers/quarkus-server/src/intTest/java/org/projectnessie/server/catalog/adls/ITAdlsIcebergCatalog.java index e32d8ed73c5..dfc1fb99aba 100644 --- a/servers/quarkus-server/src/intTest/java/org/projectnessie/server/catalog/adls/ITAdlsIcebergCatalog.java +++ b/servers/quarkus-server/src/intTest/java/org/projectnessie/server/catalog/adls/ITAdlsIcebergCatalog.java @@ -18,6 +18,7 @@ import static java.util.UUID.randomUUID; import com.google.common.collect.ImmutableMap; +import io.quarkus.test.common.TestResourceScope; import io.quarkus.test.common.WithTestResource; import io.quarkus.test.junit.QuarkusIntegrationTest; import java.net.URI; @@ -29,7 +30,9 @@ import org.projectnessie.server.catalog.WarehouseAccountSecret; import org.projectnessie.server.catalog.WarehouseLocation; -@WithTestResource(AzuriteTestResourceLifecycleManager.class) +@WithTestResource( + scope = TestResourceScope.RESTRICTED_TO_CLASS, + value = AzuriteTestResourceLifecycleManager.class) @QuarkusIntegrationTest public class ITAdlsIcebergCatalog extends AbstractIcebergCatalogIntTests { diff --git a/servers/quarkus-server/src/intTest/java/org/projectnessie/server/catalog/auth/AbstractAuthEnabledTests.java b/servers/quarkus-server/src/intTest/java/org/projectnessie/server/catalog/auth/AbstractAuthEnabledTests.java index 63cf0aa6bda..863a6ef139f 100644 --- a/servers/quarkus-server/src/intTest/java/org/projectnessie/server/catalog/auth/AbstractAuthEnabledTests.java +++ b/servers/quarkus-server/src/intTest/java/org/projectnessie/server/catalog/auth/AbstractAuthEnabledTests.java @@ -19,6 +19,7 @@ import static org.projectnessie.server.catalog.ObjectStorageMockTestResourceLifecycleManager.bucketWarehouseLocation; import com.google.common.collect.ImmutableMap; +import io.quarkus.test.common.TestResourceScope; import io.quarkus.test.common.WithTestResource; import io.quarkus.test.junit.QuarkusTestProfile; import java.lang.reflect.Field; @@ -43,7 +44,9 @@ import org.projectnessie.server.catalog.AbstractIcebergCatalogTests; import org.projectnessie.server.catalog.ObjectStorageMockTestResourceLifecycleManager; -@WithTestResource(parallel = true, value = KeycloakTestResourceLifecycleManager.class) +@WithTestResource( + scope = TestResourceScope.RESTRICTED_TO_CLASS, + value = KeycloakTestResourceLifecycleManager.class) public abstract class AbstractAuthEnabledTests extends AbstractIcebergCatalogTests { @KeycloakTokenEndpointUri protected URI tokenEndpoint; diff --git a/servers/quarkus-server/src/intTest/java/org/projectnessie/server/catalog/auth/ITOAuthTrinoS3.java b/servers/quarkus-server/src/intTest/java/org/projectnessie/server/catalog/auth/ITOAuthTrinoS3.java index 7aa0c3fc690..98d68bd2d0a 100644 --- a/servers/quarkus-server/src/intTest/java/org/projectnessie/server/catalog/auth/ITOAuthTrinoS3.java +++ b/servers/quarkus-server/src/intTest/java/org/projectnessie/server/catalog/auth/ITOAuthTrinoS3.java @@ -15,6 +15,7 @@ */ package org.projectnessie.server.catalog.auth; +import io.quarkus.test.common.TestResourceScope; import io.quarkus.test.common.WithTestResource; import io.quarkus.test.junit.QuarkusIntegrationTest; import io.quarkus.test.junit.TestProfile; @@ -31,8 +32,12 @@ import org.projectnessie.testing.keycloak.OAuthUtils; import org.testcontainers.shaded.com.google.common.collect.ImmutableMap; -@WithTestResource(MinioTestResourceLifecycleManager.class) -@WithTestResource(KeycloakTestResourceLifecycleManager.class) +@WithTestResource( + scope = TestResourceScope.RESTRICTED_TO_CLASS, + value = MinioTestResourceLifecycleManager.class) +@WithTestResource( + scope = TestResourceScope.RESTRICTED_TO_CLASS, + value = KeycloakTestResourceLifecycleManager.class) @QuarkusIntegrationTest @TestProfile(ITOAuthTrinoS3.Profile.class) public class ITOAuthTrinoS3 extends AbstractTrino { diff --git a/servers/quarkus-server/src/intTest/java/org/projectnessie/server/catalog/gcs/ITGcsIcebergCatalog.java b/servers/quarkus-server/src/intTest/java/org/projectnessie/server/catalog/gcs/ITGcsIcebergCatalog.java index 065aeab48e0..ad5291ef3d1 100644 --- a/servers/quarkus-server/src/intTest/java/org/projectnessie/server/catalog/gcs/ITGcsIcebergCatalog.java +++ b/servers/quarkus-server/src/intTest/java/org/projectnessie/server/catalog/gcs/ITGcsIcebergCatalog.java @@ -17,6 +17,7 @@ import static java.util.UUID.randomUUID; +import io.quarkus.test.common.TestResourceScope; import io.quarkus.test.common.WithTestResource; import io.quarkus.test.junit.QuarkusIntegrationTest; import java.net.URI; @@ -27,7 +28,9 @@ import org.projectnessie.server.catalog.GcsToken; import org.projectnessie.server.catalog.WarehouseLocation; -@WithTestResource(GcsEmulatorTestResourceLifecycleManager.class) +@WithTestResource( + scope = TestResourceScope.RESTRICTED_TO_CLASS, + value = GcsEmulatorTestResourceLifecycleManager.class) @QuarkusIntegrationTest public class ITGcsIcebergCatalog extends AbstractIcebergCatalogIntTests { diff --git a/servers/quarkus-server/src/intTest/java/org/projectnessie/server/catalog/s3/ITS3AssumeRoleIceberg.java b/servers/quarkus-server/src/intTest/java/org/projectnessie/server/catalog/s3/ITS3AssumeRoleIceberg.java index 8c5bdf3ba5b..72dfed0b4e9 100644 --- a/servers/quarkus-server/src/intTest/java/org/projectnessie/server/catalog/s3/ITS3AssumeRoleIceberg.java +++ b/servers/quarkus-server/src/intTest/java/org/projectnessie/server/catalog/s3/ITS3AssumeRoleIceberg.java @@ -15,12 +15,15 @@ */ package org.projectnessie.server.catalog.s3; +import io.quarkus.test.common.TestResourceScope; import io.quarkus.test.common.WithTestResource; import io.quarkus.test.junit.QuarkusIntegrationTest; import io.quarkus.test.junit.TestProfile; import org.projectnessie.server.catalog.MinioTestResourceLifecycleManager; -@WithTestResource(MinioTestResourceLifecycleManager.class) +@WithTestResource( + scope = TestResourceScope.RESTRICTED_TO_CLASS, + value = MinioTestResourceLifecycleManager.class) @QuarkusIntegrationTest @TestProfile(ITS3AssumeRoleIceberg.Profile.class) public class ITS3AssumeRoleIceberg extends AbstractAssumeRoleIceberg { diff --git a/servers/quarkus-server/src/intTest/java/org/projectnessie/server/catalog/s3/ITS3AssumeRoleIcebergCatalog.java b/servers/quarkus-server/src/intTest/java/org/projectnessie/server/catalog/s3/ITS3AssumeRoleIcebergCatalog.java index 6e82a87a22a..92c1b041fa5 100644 --- a/servers/quarkus-server/src/intTest/java/org/projectnessie/server/catalog/s3/ITS3AssumeRoleIcebergCatalog.java +++ b/servers/quarkus-server/src/intTest/java/org/projectnessie/server/catalog/s3/ITS3AssumeRoleIcebergCatalog.java @@ -17,6 +17,7 @@ import static java.util.Collections.singletonMap; +import io.quarkus.test.common.TestResourceScope; import io.quarkus.test.common.WithTestResource; import io.quarkus.test.junit.QuarkusIntegrationTest; import io.quarkus.test.junit.QuarkusTestProfile; @@ -32,7 +33,9 @@ import org.projectnessie.server.catalog.MinioTestResourceLifecycleManager; import org.testcontainers.shaded.com.google.common.collect.ImmutableMap; -@WithTestResource(MinioTestResourceLifecycleManager.class) +@WithTestResource( + scope = TestResourceScope.RESTRICTED_TO_CLASS, + value = MinioTestResourceLifecycleManager.class) @QuarkusIntegrationTest @TestProfile(ITS3AssumeRoleIcebergCatalog.Profile.class) public class ITS3AssumeRoleIcebergCatalog extends AbstractIcebergCatalogIntTests { diff --git a/servers/quarkus-server/src/intTest/java/org/projectnessie/server/catalog/s3/ITS3IcebergCatalog.java b/servers/quarkus-server/src/intTest/java/org/projectnessie/server/catalog/s3/ITS3IcebergCatalog.java index 27514acbf77..116725efe20 100644 --- a/servers/quarkus-server/src/intTest/java/org/projectnessie/server/catalog/s3/ITS3IcebergCatalog.java +++ b/servers/quarkus-server/src/intTest/java/org/projectnessie/server/catalog/s3/ITS3IcebergCatalog.java @@ -17,6 +17,7 @@ import static java.util.Collections.singletonMap; +import io.quarkus.test.common.TestResourceScope; import io.quarkus.test.common.WithTestResource; import io.quarkus.test.junit.QuarkusIntegrationTest; import java.util.HashMap; @@ -32,7 +33,9 @@ import org.projectnessie.server.catalog.AbstractIcebergCatalogIntTests; import org.projectnessie.server.catalog.MinioTestResourceLifecycleManager; -@WithTestResource(MinioTestResourceLifecycleManager.class) +@WithTestResource( + scope = TestResourceScope.RESTRICTED_TO_CLASS, + value = MinioTestResourceLifecycleManager.class) @QuarkusIntegrationTest public class ITS3IcebergCatalog extends AbstractIcebergCatalogIntTests { diff --git a/servers/quarkus-server/src/intTest/java/org/projectnessie/server/catalog/s3/ITS3NAssumeRoleIceberg.java b/servers/quarkus-server/src/intTest/java/org/projectnessie/server/catalog/s3/ITS3NAssumeRoleIceberg.java index 83831c741a1..ba42cd965bf 100644 --- a/servers/quarkus-server/src/intTest/java/org/projectnessie/server/catalog/s3/ITS3NAssumeRoleIceberg.java +++ b/servers/quarkus-server/src/intTest/java/org/projectnessie/server/catalog/s3/ITS3NAssumeRoleIceberg.java @@ -16,6 +16,7 @@ package org.projectnessie.server.catalog.s3; import io.quarkus.test.common.ResourceArg; +import io.quarkus.test.common.TestResourceScope; import io.quarkus.test.common.WithTestResource; import io.quarkus.test.junit.QuarkusIntegrationTest; import io.quarkus.test.junit.TestProfile; @@ -23,6 +24,7 @@ @WithTestResource( initArgs = {@ResourceArg(name = "scheme", value = "s3n")}, + scope = TestResourceScope.RESTRICTED_TO_CLASS, value = MinioTestResourceLifecycleManager.class) @QuarkusIntegrationTest @TestProfile(ITS3NAssumeRoleIceberg.Profile.class) diff --git a/servers/quarkus-server/src/intTest/java/org/projectnessie/server/catalog/s3/ITTrinoS3.java b/servers/quarkus-server/src/intTest/java/org/projectnessie/server/catalog/s3/ITTrinoS3.java index 6aad95c2a52..f162ad04085 100644 --- a/servers/quarkus-server/src/intTest/java/org/projectnessie/server/catalog/s3/ITTrinoS3.java +++ b/servers/quarkus-server/src/intTest/java/org/projectnessie/server/catalog/s3/ITTrinoS3.java @@ -15,13 +15,16 @@ */ package org.projectnessie.server.catalog.s3; +import io.quarkus.test.common.TestResourceScope; import io.quarkus.test.common.WithTestResource; import io.quarkus.test.junit.QuarkusIntegrationTest; import io.quarkus.test.junit.TestProfile; import org.projectnessie.server.catalog.AbstractTrino; import org.projectnessie.server.catalog.MinioTestResourceLifecycleManager; -@WithTestResource(MinioTestResourceLifecycleManager.class) +@WithTestResource( + scope = TestResourceScope.RESTRICTED_TO_CLASS, + value = MinioTestResourceLifecycleManager.class) @QuarkusIntegrationTest @TestProfile(ITTrinoS3.Profile.class) public class ITTrinoS3 extends AbstractTrino { diff --git a/servers/quarkus-server/src/intTest/java/org/projectnessie/server/secrets/ITSecretsAWS.java b/servers/quarkus-server/src/intTest/java/org/projectnessie/server/secrets/ITSecretsAWS.java index d905403dede..298eea739b1 100644 --- a/servers/quarkus-server/src/intTest/java/org/projectnessie/server/secrets/ITSecretsAWS.java +++ b/servers/quarkus-server/src/intTest/java/org/projectnessie/server/secrets/ITSecretsAWS.java @@ -18,11 +18,14 @@ import static java.util.Locale.ROOT; import static org.projectnessie.quarkus.config.QuarkusSecretsConfig.ExternalSecretsManagerType.AMAZON; +import io.quarkus.test.common.TestResourceScope; import io.quarkus.test.common.WithTestResource; import io.quarkus.test.junit.QuarkusTest; @QuarkusTest // because the tests need @Inject'd fields -@WithTestResource(LocalstackTestResourceLifecycleManager.class) +@WithTestResource( + scope = TestResourceScope.RESTRICTED_TO_CLASS, + value = LocalstackTestResourceLifecycleManager.class) public class ITSecretsAWS extends AbstractSecretsSuppliers { @Override protected String providerName() { diff --git a/servers/quarkus-server/src/intTest/java/org/projectnessie/server/secrets/ITSecretsVault.java b/servers/quarkus-server/src/intTest/java/org/projectnessie/server/secrets/ITSecretsVault.java index dec79d9f7e6..a1bc2f1d3bb 100644 --- a/servers/quarkus-server/src/intTest/java/org/projectnessie/server/secrets/ITSecretsVault.java +++ b/servers/quarkus-server/src/intTest/java/org/projectnessie/server/secrets/ITSecretsVault.java @@ -18,11 +18,14 @@ import static java.util.Locale.ROOT; import static org.projectnessie.quarkus.config.QuarkusSecretsConfig.ExternalSecretsManagerType.VAULT; +import io.quarkus.test.common.TestResourceScope; import io.quarkus.test.common.WithTestResource; import io.quarkus.test.junit.QuarkusTest; @QuarkusTest // because the tests need @Inject'd fields -@WithTestResource(VaultTestResourceLifecycleManager.class) +@WithTestResource( + scope = TestResourceScope.RESTRICTED_TO_CLASS, + value = VaultTestResourceLifecycleManager.class) public class ITSecretsVault extends AbstractSecretsSuppliers { @Override protected String providerName() { diff --git a/servers/quarkus-server/src/test/java/org/projectnessie/server/TestBearerAuthentication.java b/servers/quarkus-server/src/test/java/org/projectnessie/server/TestBearerAuthentication.java index 3fd85738974..e94504c04a8 100644 --- a/servers/quarkus-server/src/test/java/org/projectnessie/server/TestBearerAuthentication.java +++ b/servers/quarkus-server/src/test/java/org/projectnessie/server/TestBearerAuthentication.java @@ -17,6 +17,7 @@ import com.google.common.collect.ImmutableMap; import com.google.common.collect.ImmutableSet; +import io.quarkus.test.common.TestResourceScope; import io.quarkus.test.common.WithTestResource; import io.quarkus.test.junit.QuarkusTest; import io.quarkus.test.junit.QuarkusTestProfile; @@ -27,7 +28,9 @@ import org.projectnessie.server.authn.AuthenticationEnabledProfile; @QuarkusTest -@WithTestResource(OidcWiremockTestResource.class) +@WithTestResource( + scope = TestResourceScope.RESTRICTED_TO_CLASS, + value = OidcWiremockTestResource.class) @TestProfile(value = TestBearerAuthentication.Profile.class) public class TestBearerAuthentication extends AbstractBearerAuthentication { diff --git a/servers/quarkus-server/src/test/java/org/projectnessie/server/TestOAuth2Authentication.java b/servers/quarkus-server/src/test/java/org/projectnessie/server/TestOAuth2Authentication.java index 059cbe9f8f6..f45af275093 100644 --- a/servers/quarkus-server/src/test/java/org/projectnessie/server/TestOAuth2Authentication.java +++ b/servers/quarkus-server/src/test/java/org/projectnessie/server/TestOAuth2Authentication.java @@ -27,6 +27,7 @@ import com.github.tomakehurst.wiremock.client.WireMock; import com.google.common.collect.ImmutableMap; import com.google.common.collect.ImmutableSet; +import io.quarkus.test.common.TestResourceScope; import io.quarkus.test.common.WithTestResource; import io.quarkus.test.junit.QuarkusTest; import io.quarkus.test.junit.QuarkusTestProfile; @@ -53,7 +54,9 @@ @SuppressWarnings("resource") @QuarkusTest -@WithTestResource(OidcWiremockTestResource.class) +@WithTestResource( + scope = TestResourceScope.RESTRICTED_TO_CLASS, + value = OidcWiremockTestResource.class) @TestProfile(value = TestOAuth2Authentication.Profile.class) @TestInstance(TestInstance.Lifecycle.PER_CLASS) public class TestOAuth2Authentication extends AbstractOAuth2Authentication { diff --git a/servers/quarkus-server/src/test/java/org/projectnessie/server/catalog/AbstractIcebergCatalogUnitTests.java b/servers/quarkus-server/src/test/java/org/projectnessie/server/catalog/AbstractIcebergCatalogUnitTests.java index 34fe31fdc9d..c93da6fc3c9 100644 --- a/servers/quarkus-server/src/test/java/org/projectnessie/server/catalog/AbstractIcebergCatalogUnitTests.java +++ b/servers/quarkus-server/src/test/java/org/projectnessie/server/catalog/AbstractIcebergCatalogUnitTests.java @@ -27,6 +27,7 @@ import com.fasterxml.jackson.databind.PropertyNamingStrategies; import com.fasterxml.jackson.databind.node.ObjectNode; import com.fasterxml.jackson.databind.type.ArrayType; +import io.quarkus.test.common.TestResourceScope; import io.quarkus.test.common.WithTestResource; import java.net.URI; import java.util.ArrayList; @@ -52,7 +53,9 @@ import org.projectnessie.objectstoragemock.HeapStorageBucket; import org.projectnessie.server.catalog.ObjectStorageMockTestResourceLifecycleManager.AccessCheckHandlerHolder; -@WithTestResource(IcebergResourceLifecycleManager.class) +@WithTestResource( + scope = TestResourceScope.RESTRICTED_TO_CLASS, + value = IcebergResourceLifecycleManager.class) public abstract class AbstractIcebergCatalogUnitTests extends AbstractIcebergCatalogTests { HeapStorageBucket heapStorageBucket; diff --git a/servers/quarkus-server/src/test/java/org/projectnessie/server/catalog/AbstractIcebergViewCatalogUnitTests.java b/servers/quarkus-server/src/test/java/org/projectnessie/server/catalog/AbstractIcebergViewCatalogUnitTests.java index 6e081ed6a09..146c8497d53 100644 --- a/servers/quarkus-server/src/test/java/org/projectnessie/server/catalog/AbstractIcebergViewCatalogUnitTests.java +++ b/servers/quarkus-server/src/test/java/org/projectnessie/server/catalog/AbstractIcebergViewCatalogUnitTests.java @@ -15,11 +15,14 @@ */ package org.projectnessie.server.catalog; +import io.quarkus.test.common.TestResourceScope; import io.quarkus.test.common.WithTestResource; import org.junit.jupiter.api.BeforeEach; import org.projectnessie.objectstoragemock.HeapStorageBucket; -@WithTestResource(IcebergResourceLifecycleManager.class) +@WithTestResource( + scope = TestResourceScope.RESTRICTED_TO_CLASS, + value = IcebergResourceLifecycleManager.class) public abstract class AbstractIcebergViewCatalogUnitTests extends AbstractIcebergViewCatalogTests { HeapStorageBucket heapStorageBucket; diff --git a/servers/quarkus-server/src/test/java/org/projectnessie/server/catalog/s3/TestVendedS3CredentialsExpiry.java b/servers/quarkus-server/src/test/java/org/projectnessie/server/catalog/s3/TestVendedS3CredentialsExpiry.java index 3917e1346d2..74f520534c3 100644 --- a/servers/quarkus-server/src/test/java/org/projectnessie/server/catalog/s3/TestVendedS3CredentialsExpiry.java +++ b/servers/quarkus-server/src/test/java/org/projectnessie/server/catalog/s3/TestVendedS3CredentialsExpiry.java @@ -19,6 +19,7 @@ import static org.projectnessie.server.catalog.IcebergCatalogTestCommon.WAREHOUSE_NAME; import com.google.common.collect.ImmutableMap; +import io.quarkus.test.common.TestResourceScope; import io.quarkus.test.common.WithTestResource; import io.quarkus.test.junit.QuarkusTest; import io.quarkus.test.junit.TestProfile; @@ -44,8 +45,12 @@ import org.projectnessie.server.catalog.ObjectStorageMockTestResourceLifecycleManager.AssumeRoleHandlerHolder; import org.projectnessie.server.catalog.S3UnitTestProfiles; -@WithTestResource(ObjectStorageMockTestResourceLifecycleManager.class) -@WithTestResource(IcebergResourceLifecycleManager.class) +@WithTestResource( + scope = TestResourceScope.RESTRICTED_TO_CLASS, + value = ObjectStorageMockTestResourceLifecycleManager.class) +@WithTestResource( + scope = TestResourceScope.RESTRICTED_TO_CLASS, + value = IcebergResourceLifecycleManager.class) @QuarkusTest @TestProfile(TestVendedS3CredentialsExpiry.Profile.class) public class TestVendedS3CredentialsExpiry {