Skip to content

Commit

Permalink
chore: update libraries-bom in 3.x (#3425)
Browse files Browse the repository at this point in the history
* chore: update libraries-bom in 3.x

* rm method

* update workflow

* disable test

* Update DefaultSubscriberFactoryTests.java

---------

Co-authored-by: Diego Marquez <[email protected]>
  • Loading branch information
JoeWang1127 and diegomarquezp authored Dec 19, 2024
1 parent a8ff495 commit 15ca0dc
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 28 deletions.
33 changes: 10 additions & 23 deletions .github/workflows/unitTests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ on:

jobs:
unitTests:
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
strategy:
fail-fast: false
matrix:
Expand All @@ -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
Expand All @@ -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'
Expand All @@ -58,22 +54,19 @@ jobs:
--define maven.test.skip=true \
--define maven.javadoc.skip=true \
install
- name: Unit Tests
run: |
./mvnw \
--batch-mode \
--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
Expand All @@ -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 \
Expand All @@ -116,7 +105,6 @@ jobs:
-Dcheckstyle.skip \
clean \
package
- name: docsCheck
run: |
./mvnw \
Expand All @@ -128,7 +116,6 @@ jobs:
--projects docs \
clean \
package
- name: Archive Artifacts
if: always()
continue-on-error: true
Expand Down
2 changes: 1 addition & 1 deletion spring-cloud-gcp-dependencies/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
</distributionManagement>

<properties>
<gcp-libraries-bom.version>26.51.0</gcp-libraries-bom.version>
<gcp-libraries-bom.version>26.52.0</gcp-libraries-bom.version>
<cloud-sql-socket-factory.version>1.20.1</cloud-sql-socket-factory.version>
<r2dbc-mysql-driver.version>0.9.7</r2dbc-mysql-driver.version>
<r2dbc-postgres-driver.version>0.8.13.RELEASE</r2dbc-postgres-driver.version>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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");
}
Expand Down

0 comments on commit 15ca0dc

Please sign in to comment.