From 9399e6a8710cc19a003aa528dde7c16bb69b2d6c Mon Sep 17 00:00:00 2001 From: miltortegon_expedia Date: Tue, 21 Apr 2026 10:23:05 -0500 Subject: [PATCH 1/3] Upgrade LocalStack to 3.7.0 and switch CI Java distribution to Temurin - Update ContainerTestUtils to use localstack/localstack:3.7.0 (3.0.0 had an 14s startup timeout that caused flaky failures on Docker Desktop) - Switch GitHub Actions workflows from corretto to temurin distribution, which is more appropriate for an open-source project Co-Authored-By: Claude Sonnet 4.6 --- .github/workflows/build.yml | 3 ++- .github/workflows/main.yml | 2 +- .github/workflows/release.yml | 2 +- .../integration/utils/ContainerTestUtils.java | 20 ++++++++++--------- 4 files changed, 15 insertions(+), 12 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index fbb46131..869d967d 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -28,7 +28,7 @@ jobs: - name: Set up JDK uses: actions/setup-java@v4 with: - distribution: 'corretto' + distribution: 'temurin' java-version: '21' java-package: jdk server-id: central # Value of the distributionManagement/repository/id field of the pom.xml @@ -48,3 +48,4 @@ jobs: DOCKERHUB_USERNAME: ${{ secrets.DOCKER_HUB_USERNAME }} DOCKERHUB_PASSWORD: ${{ secrets.DOCKER_HUB_PASSWORD }} GPG_PASSPHRASE: ${{ secrets.GPG_PRIVATE_KEY_PASSPHRASE }} + diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index bdb9330d..01fc7935 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -26,7 +26,7 @@ jobs: - name: Set up JDK uses: actions/setup-java@v4 with: - distribution: 'corretto' + distribution: 'temurin' java-version: '21' java-package: jdk diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index afc302c0..177438b9 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -19,7 +19,7 @@ jobs: - name: Set up JDK uses: actions/setup-java@v4 with: - distribution: 'corretto' + distribution: 'temurin' java-version: '21' java-package: jdk server-id: central # Value of the distributionManagement/repository/id field of the pom.xml diff --git a/beekeeper-integration-tests/src/test/java/com/expediagroup/beekeeper/integration/utils/ContainerTestUtils.java b/beekeeper-integration-tests/src/test/java/com/expediagroup/beekeeper/integration/utils/ContainerTestUtils.java index 38f9bb7b..17fa5c5b 100644 --- a/beekeeper-integration-tests/src/test/java/com/expediagroup/beekeeper/integration/utils/ContainerTestUtils.java +++ b/beekeeper-integration-tests/src/test/java/com/expediagroup/beekeeper/integration/utils/ContainerTestUtils.java @@ -35,11 +35,12 @@ public static MySQLContainer mySqlContainer() { } public static LocalStackContainer awsContainer(LocalStackContainer.Service service) { - return new LocalStackContainer(DockerImageName.parse("localstack/localstack:3.0.0")) + return new LocalStackContainer(DockerImageName.parse("localstack/localstack:3.7.0")) .withServices(service); } - public static String awsServiceEndpoint(LocalStackContainer awsContainer, LocalStackContainer.Service service) { + public static String awsServiceEndpoint( + LocalStackContainer awsContainer, LocalStackContainer.Service service) { return awsContainer.getEndpointOverride(service).toString(); } @@ -48,18 +49,19 @@ public static String queueUrl(LocalStackContainer awsContainer, String queue) { } public static AmazonSQS sqsClient(LocalStackContainer awsContainer, String region) { - EndpointConfiguration endpointConfiguration = new EndpointConfiguration(awsServiceEndpoint(awsContainer, SQS), - region); - return AmazonSQSClientBuilder.standard().withEndpointConfiguration(endpointConfiguration).build(); + EndpointConfiguration endpointConfiguration = + new EndpointConfiguration(awsServiceEndpoint(awsContainer, SQS), region); + return AmazonSQSClientBuilder.standard() + .withEndpointConfiguration(endpointConfiguration) + .build(); } public static AmazonS3 s3Client(LocalStackContainer awsContainer, String region) { - EndpointConfiguration endpointConfiguration = new EndpointConfiguration(awsServiceEndpoint(awsContainer, S3), - region); + EndpointConfiguration endpointConfiguration = + new EndpointConfiguration(awsServiceEndpoint(awsContainer, S3), region); // build with disableChunkedEncoding to be able to create empty files - return AmazonS3ClientBuilder - .standard() + return AmazonS3ClientBuilder.standard() .withEndpointConfiguration(endpointConfiguration) .withPathStyleAccessEnabled(true) .disableChunkedEncoding() From ffe6ecfa362a75a320f788383b5d3e25c0a59b10 Mon Sep 17 00:00:00 2001 From: miltortegon_expedia Date: Tue, 21 Apr 2026 10:35:29 -0500 Subject: [PATCH 2/3] Clean up --- .../integration/utils/ContainerTestUtils.java | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/beekeeper-integration-tests/src/test/java/com/expediagroup/beekeeper/integration/utils/ContainerTestUtils.java b/beekeeper-integration-tests/src/test/java/com/expediagroup/beekeeper/integration/utils/ContainerTestUtils.java index 17fa5c5b..fdbc00a7 100644 --- a/beekeeper-integration-tests/src/test/java/com/expediagroup/beekeeper/integration/utils/ContainerTestUtils.java +++ b/beekeeper-integration-tests/src/test/java/com/expediagroup/beekeeper/integration/utils/ContainerTestUtils.java @@ -39,8 +39,7 @@ public static LocalStackContainer awsContainer(LocalStackContainer.Service servi .withServices(service); } - public static String awsServiceEndpoint( - LocalStackContainer awsContainer, LocalStackContainer.Service service) { + public static String awsServiceEndpoint(LocalStackContainer awsContainer, LocalStackContainer.Service service) { return awsContainer.getEndpointOverride(service).toString(); } @@ -49,19 +48,18 @@ public static String queueUrl(LocalStackContainer awsContainer, String queue) { } public static AmazonSQS sqsClient(LocalStackContainer awsContainer, String region) { - EndpointConfiguration endpointConfiguration = - new EndpointConfiguration(awsServiceEndpoint(awsContainer, SQS), region); - return AmazonSQSClientBuilder.standard() - .withEndpointConfiguration(endpointConfiguration) - .build(); + EndpointConfiguration endpointConfiguration = new EndpointConfiguration(awsServiceEndpoint(awsContainer, SQS), + region); + return AmazonSQSClientBuilder.standard().withEndpointConfiguration(endpointConfiguration).build(); } public static AmazonS3 s3Client(LocalStackContainer awsContainer, String region) { - EndpointConfiguration endpointConfiguration = - new EndpointConfiguration(awsServiceEndpoint(awsContainer, S3), region); + EndpointConfiguration endpointConfiguration = new EndpointConfiguration(awsServiceEndpoint(awsContainer, S3), + region); // build with disableChunkedEncoding to be able to create empty files - return AmazonS3ClientBuilder.standard() + return AmazonS3ClientBuilder + .standard() .withEndpointConfiguration(endpointConfiguration) .withPathStyleAccessEnabled(true) .disableChunkedEncoding() From 98972537db8369021d07bf7d29d583df137c175a Mon Sep 17 00:00:00 2001 From: miltortegon_expedia Date: Tue, 21 Apr 2026 12:01:02 -0500 Subject: [PATCH 3/3] Fix UnfinishedStubbing race condition in CleanupServiceSchedulerTest Remove redundant @ExtendWith(MockitoExtension.class) from both beekeeper-metadata-cleanup and beekeeper-path-cleanup scheduler tests. All mocks use @MockBean (Spring-managed), so MockitoExtension was unnecessary and caused UnfinishedStubbing errors due to the scheduler firing concurrently during Mockito stub recording. Co-Authored-By: Claude Sonnet 4.6 --- .github/workflows/build.yml | 1 - .../metadata/cleanup/service/CleanupServiceSchedulerTest.java | 4 +--- .../path/cleanup/service/CleanupServiceSchedulerTest.java | 4 +--- 3 files changed, 2 insertions(+), 7 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 869d967d..caa10693 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -48,4 +48,3 @@ jobs: DOCKERHUB_USERNAME: ${{ secrets.DOCKER_HUB_USERNAME }} DOCKERHUB_PASSWORD: ${{ secrets.DOCKER_HUB_PASSWORD }} GPG_PASSPHRASE: ${{ secrets.GPG_PRIVATE_KEY_PASSPHRASE }} - diff --git a/beekeeper-metadata-cleanup/src/test/java/com/expediagroup/beekeeper/metadata/cleanup/service/CleanupServiceSchedulerTest.java b/beekeeper-metadata-cleanup/src/test/java/com/expediagroup/beekeeper/metadata/cleanup/service/CleanupServiceSchedulerTest.java index 1fc99238..877d6c5c 100644 --- a/beekeeper-metadata-cleanup/src/test/java/com/expediagroup/beekeeper/metadata/cleanup/service/CleanupServiceSchedulerTest.java +++ b/beekeeper-metadata-cleanup/src/test/java/com/expediagroup/beekeeper/metadata/cleanup/service/CleanupServiceSchedulerTest.java @@ -1,5 +1,5 @@ /** - * Copyright (C) 2019-2021 Expedia, Inc. + * Copyright (C) 2019-2026 Expedia, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -26,7 +26,6 @@ import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtendWith; -import org.mockito.junit.jupiter.MockitoExtension; import org.springframework.boot.test.mock.mockito.MockBean; import org.springframework.test.annotation.DirtiesContext; import org.springframework.test.context.ContextConfiguration; @@ -43,7 +42,6 @@ import com.expediagroup.beekeeper.core.error.BeekeeperException; @ExtendWith(SpringExtension.class) -@ExtendWith(MockitoExtension.class) @TestPropertySource(properties = { "properties.scheduler-delay-ms=2000" }) @ContextConfiguration(classes = { CleanupServiceScheduler.class, TestConfig.class }, diff --git a/beekeeper-path-cleanup/src/test/java/com/expediagroup/beekeeper/path/cleanup/service/CleanupServiceSchedulerTest.java b/beekeeper-path-cleanup/src/test/java/com/expediagroup/beekeeper/path/cleanup/service/CleanupServiceSchedulerTest.java index 7807da61..7db4c510 100644 --- a/beekeeper-path-cleanup/src/test/java/com/expediagroup/beekeeper/path/cleanup/service/CleanupServiceSchedulerTest.java +++ b/beekeeper-path-cleanup/src/test/java/com/expediagroup/beekeeper/path/cleanup/service/CleanupServiceSchedulerTest.java @@ -1,5 +1,5 @@ /** - * Copyright (C) 2019-2021 Expedia, Inc. + * Copyright (C) 2019-2026 Expedia, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -26,7 +26,6 @@ import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtendWith; -import org.mockito.junit.jupiter.MockitoExtension; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.test.mock.mockito.MockBean; import org.springframework.test.annotation.DirtiesContext; @@ -44,7 +43,6 @@ import com.expediagroup.beekeeper.core.error.BeekeeperException; @ExtendWith(SpringExtension.class) -@ExtendWith(MockitoExtension.class) @TestPropertySource(properties = { "properties.scheduler-delay-ms=2000" }) @ContextConfiguration(classes = { CleanupServiceScheduler.class, TestConfig.class },