From 2705936fa8eec55b4641c151054c821efd72438b Mon Sep 17 00:00:00 2001 From: Artem Bilan Date: Thu, 19 Oct 2023 16:12:57 -0400 Subject: [PATCH] Fix race condition for multi-stream test * Fix GE `user.name` * Attempt to fix the path to test results from GH action --- .github/workflows/CI.yml | 5 ++--- .../KclMessageDrivenChannelAdapterMultiStreamTests.java | 4 ++-- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index be33e78..a088f2b 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -10,7 +10,6 @@ env: GRADLE_ENTERPRISE_CACHE_USERNAME: ${{ secrets.GRADLE_ENTERPRISE_CACHE_USER }} GRADLE_ENTERPRISE_CACHE_PASSWORD: ${{ secrets.GRADLE_ENTERPRISE_CACHE_PASSWORD }} GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GRADLE_ENTERPRISE_SECRET_ACCESS_KEY }} - GRADLE_ENTERPRISE_CACHE_URL: 'https://ge-cache.spring.vmware.com/cache' jobs: build_snapshot: @@ -48,7 +47,7 @@ jobs: - name: Build and Publish run: | - jf gradle build dist artifactoryPublish -Duser.name=spring-builds+github@vmware.com + jf gradle build dist artifactoryPublish -Duser.name=spring-builds+github jf build-publish - name: Capture Test Results @@ -56,5 +55,5 @@ jobs: uses: actions/upload-artifact@v3 with: name: test-results - path: '*/build/reports/tests/**/*.*' + path: '**/build/reports/tests/**/*.*' retention-days: 3 diff --git a/src/test/java/org/springframework/integration/aws/kinesis/KclMessageDrivenChannelAdapterMultiStreamTests.java b/src/test/java/org/springframework/integration/aws/kinesis/KclMessageDrivenChannelAdapterMultiStreamTests.java index 4547f32..2ec1041 100644 --- a/src/test/java/org/springframework/integration/aws/kinesis/KclMessageDrivenChannelAdapterMultiStreamTests.java +++ b/src/test/java/org/springframework/integration/aws/kinesis/KclMessageDrivenChannelAdapterMultiStreamTests.java @@ -120,12 +120,12 @@ public class KclMessageDrivenChannelAdapterMultiStreamTests implements Localstac // The below statement works but with a higher timeout. For 2 streams, this takes too long. Message receive = this.kinesisReceiveChannel.receive(300_000); assertThat(receive).isNotNull(); - assertThat(receive.getPayload()).isEqualTo(testData); + assertThat(receive.getPayload()).isIn(testData, testData2); assertThat(receive.getHeaders().get(AwsHeaders.RECEIVED_SEQUENCE_NUMBER, String.class)).isNotEmpty(); receive = this.kinesisReceiveChannel.receive(10_000); assertThat(receive).isNotNull(); - assertThat(receive.getPayload()).isEqualTo(testData2); + assertThat(receive.getPayload()).isIn(testData, testData2); List stream1Consumers = AMAZON_KINESIS.describeStream(request -> request.streamName(TEST_STREAM1))