diff --git a/.github/workflows/unitTests.yaml b/.github/workflows/unitTests.yaml index a9ff15202e..66d01c87ee 100644 --- a/.github/workflows/unitTests.yaml +++ b/.github/workflows/unitTests.yaml @@ -13,7 +13,7 @@ on: jobs: unitTests: - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 strategy: fail-fast: false matrix: @@ -22,19 +22,16 @@ jobs: - name: Get current date id: date run: echo "::set-output name=date::$(date +'%Y-%m-%d' --utc)" - - - uses: actions/checkout@v2 - - - uses: actions/setup-java@v1 + - uses: actions/checkout@v4 + - uses: actions/setup-java@v4 with: java-version: ${{ matrix.java }} - - - uses: actions/cache@v2 + distribution: temurin + - uses: actions/cache@v4 id: mvn-cache with: path: ~/.m2/repository key: ${{ runner.os }}-maven-unified-${{ steps.date.outputs.date }} - - name: Mvn install # Need this when the directory/pom structure changes id: install1 continue-on-error: true @@ -46,7 +43,6 @@ jobs: --define maven.test.skip=true \ --define maven.javadoc.skip=true \ install - - name: Retry install on failure id: install2 if: steps.install1.outcome == 'failure' @@ -58,7 +54,6 @@ jobs: --define maven.test.skip=true \ --define maven.javadoc.skip=true \ install - - name: Unit Tests run: | ./mvnw \ @@ -66,14 +61,12 @@ jobs: --fail-at-end \ --threads 1.5C \ test - - name: Aggregate Report run: | ./mvnw \ --batch-mode \ --define aggregate=true \ surefire-report:report-only - - name: Archive logs if: always() continue-on-error: true @@ -84,28 +77,24 @@ jobs: **/target/surefire-reports/* **/target/site - releaseCheck: - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 strategy: fail-fast: false steps: - name: Get current date id: date run: echo "::set-output name=date::$(date +'%Y-%m-%d' --utc)" - - - uses: actions/checkout@v2 - - - uses: actions/setup-java@v1 + - uses: actions/checkout@v4 + - uses: actions/setup-java@v4 with: java-version: 11 - - - uses: actions/cache@v2 + distribution: temurin + - uses: actions/cache@v4 id: mvn-cache with: path: ~/.m2/repository key: ${{ runner.os }}-maven-unified-${{ steps.date.outputs.date }} - - name: releaseCheck run: | ./mvnw \ @@ -116,7 +105,6 @@ jobs: -Dcheckstyle.skip \ clean \ package - - name: docsCheck run: | ./mvnw \ @@ -128,7 +116,6 @@ jobs: --projects docs \ clean \ package - - name: Archive Artifacts if: always() continue-on-error: true diff --git a/spring-cloud-gcp-dependencies/pom.xml b/spring-cloud-gcp-dependencies/pom.xml index 6de35f52a1..00d58967c5 100644 --- a/spring-cloud-gcp-dependencies/pom.xml +++ b/spring-cloud-gcp-dependencies/pom.xml @@ -29,7 +29,7 @@ - 26.51.0 + 26.52.0 1.20.1 0.9.7 0.8.13.RELEASE diff --git a/spring-cloud-gcp-pubsub/src/test/java/com/google/cloud/spring/pubsub/support/DefaultPublisherFactoryTests.java b/spring-cloud-gcp-pubsub/src/test/java/com/google/cloud/spring/pubsub/support/DefaultPublisherFactoryTests.java index 71b94953a1..786619e894 100644 --- a/spring-cloud-gcp-pubsub/src/test/java/com/google/cloud/spring/pubsub/support/DefaultPublisherFactoryTests.java +++ b/spring-cloud-gcp-pubsub/src/test/java/com/google/cloud/spring/pubsub/support/DefaultPublisherFactoryTests.java @@ -47,7 +47,6 @@ public void setUp() throws IOException { factory.setCredentialsProvider(NoCredentialsProvider.create()); TransportChannelProvider mockChannelProvider = mock(TransportChannelProvider.class); TransportChannel mockTransportChannel = mock(TransportChannel.class); - when(mockChannelProvider.withUseS2A(anyBoolean())).thenReturn(mockChannelProvider); when(mockChannelProvider.getTransportChannel()).thenReturn(mockTransportChannel); ApiCallContext mockContext = mock(ApiCallContext.class); when(mockTransportChannel.getEmptyCallContext()).thenReturn(mockContext); diff --git a/spring-cloud-gcp-pubsub/src/test/java/com/google/cloud/spring/pubsub/support/DefaultSubscriberFactoryTests.java b/spring-cloud-gcp-pubsub/src/test/java/com/google/cloud/spring/pubsub/support/DefaultSubscriberFactoryTests.java index 2c48b671b3..58fa9f0676 100644 --- a/spring-cloud-gcp-pubsub/src/test/java/com/google/cloud/spring/pubsub/support/DefaultSubscriberFactoryTests.java +++ b/spring-cloud-gcp-pubsub/src/test/java/com/google/cloud/spring/pubsub/support/DefaultSubscriberFactoryTests.java @@ -48,6 +48,7 @@ import java.util.concurrent.ConcurrentHashMap; import org.apache.commons.lang3.reflect.FieldUtils; import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtendWith; import org.mockito.Mock; @@ -381,9 +382,9 @@ void testCreateSubscriber_validateSetProperties() { assertThat(expectedSubscriber.getFlowControlSettings().getLimitExceededBehavior()) .isEqualTo(FlowController.LimitExceededBehavior.Ignore); assertThat(expectedSubscriber) - .hasFieldOrPropertyWithValue("maxAckExtensionPeriod", Duration.ofSeconds(2L)) - .hasFieldOrPropertyWithValue("minDurationPerAckExtension", Duration.ofSeconds(3L)) - .hasFieldOrPropertyWithValue("maxDurationPerAckExtension", Duration.ofSeconds(4L)) + .hasFieldOrPropertyWithValue("maxAckExtensionPeriod", java.time.Duration.ofSeconds(2L)) + .hasFieldOrPropertyWithValue("minDurationPerAckExtension", java.time.Duration.ofSeconds(3L)) + .hasFieldOrPropertyWithValue("maxDurationPerAckExtension", java.time.Duration.ofSeconds(4L)) .hasFieldOrPropertyWithValue("numPullers", 2) .hasFieldOrPropertyWithValue("subStubSettings.endpoint", "test.endpoint"); }