From daceee131b79b38a620be0b2bad7273f7e936bae Mon Sep 17 00:00:00 2001 From: Artem Bilan Date: Wed, 23 Oct 2024 15:17:58 -0400 Subject: [PATCH] Upgrade WFs from `main` to `v4` The `v3` has to be updated by Dependabot automatically **Auto-cherry-pick to `3.2.x` & `3.1.x`** --- .../workflows/announce-milestone-planning.yml | 2 +- .github/workflows/ci-snapshot.yml | 2 +- .github/workflows/merge-dependabot-pr.yml | 2 +- .github/workflows/release.yml | 2 +- .../kafka/test/context/Gh3585Tests.java | 27 +++++++++++++++++++ 5 files changed, 31 insertions(+), 4 deletions(-) create mode 100644 spring-kafka-test/src/test/java/org/springframework/kafka/test/context/Gh3585Tests.java diff --git a/.github/workflows/announce-milestone-planning.yml b/.github/workflows/announce-milestone-planning.yml index 95c62e26de..cc759030e8 100644 --- a/.github/workflows/announce-milestone-planning.yml +++ b/.github/workflows/announce-milestone-planning.yml @@ -6,6 +6,6 @@ on: jobs: announce-milestone-planning: - uses: spring-io/spring-github-workflows/.github/workflows/spring-announce-milestone-planning.yml@main + uses: spring-io/spring-github-workflows/.github/workflows/spring-announce-milestone-planning.yml@v4 secrets: SPRING_RELEASE_CHAT_WEBHOOK_URL: ${{ secrets.SPRING_RELEASE_GCHAT_WEBHOOK_URL }} diff --git a/.github/workflows/ci-snapshot.yml b/.github/workflows/ci-snapshot.yml index a21192cd2c..966b38c85c 100644 --- a/.github/workflows/ci-snapshot.yml +++ b/.github/workflows/ci-snapshot.yml @@ -17,7 +17,7 @@ concurrency: jobs: build-snapshot: - uses: spring-io/spring-github-workflows/.github/workflows/spring-artifactory-gradle-snapshot.yml@main + uses: spring-io/spring-github-workflows/.github/workflows/spring-artifactory-gradle-snapshot.yml@v4 with: gradleTasks: ${{ github.event_name == 'schedule' && '--rerun-tasks' || '' }} secrets: diff --git a/.github/workflows/merge-dependabot-pr.yml b/.github/workflows/merge-dependabot-pr.yml index 0b1d927d8e..44a74e507b 100644 --- a/.github/workflows/merge-dependabot-pr.yml +++ b/.github/workflows/merge-dependabot-pr.yml @@ -12,7 +12,7 @@ jobs: merge-dependabot-pr: permissions: write-all - uses: spring-io/spring-github-workflows/.github/workflows/spring-merge-dependabot-pr.yml@main + uses: spring-io/spring-github-workflows/.github/workflows/spring-merge-dependabot-pr.yml@v4 with: mergeArguments: --auto --squash autoMergeSnapshots: true \ No newline at end of file diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 90f17f1609..40dfecca8b 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -12,7 +12,7 @@ jobs: contents: write issues: write - uses: spring-io/spring-github-workflows/.github/workflows/spring-artifactory-gradle-release.yml@main + uses: spring-io/spring-github-workflows/.github/workflows/spring-artifactory-gradle-release.yml@v4 secrets: GH_ACTIONS_REPO_TOKEN: ${{ secrets.GH_ACTIONS_REPO_TOKEN }} DEVELOCITY_ACCESS_KEY: ${{ secrets.DEVELOCITY_ACCESS_KEY }} diff --git a/spring-kafka-test/src/test/java/org/springframework/kafka/test/context/Gh3585Tests.java b/spring-kafka-test/src/test/java/org/springframework/kafka/test/context/Gh3585Tests.java new file mode 100644 index 0000000000..2dffdfd941 --- /dev/null +++ b/spring-kafka-test/src/test/java/org/springframework/kafka/test/context/Gh3585Tests.java @@ -0,0 +1,27 @@ +package org.springframework.kafka.test.context; + +import org.junit.Test; +import org.junit.runner.RunWith; + +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.kafka.test.EmbeddedKafkaZKBroker; +import org.springframework.kafka.test.core.BrokerAddress; +import org.springframework.test.annotation.DirtiesContext; +import org.springframework.test.context.junit4.SpringRunner; + +import static org.assertj.core.api.Assertions.assertThat; + +@RunWith(SpringRunner.class) +@DirtiesContext +@EmbeddedKafka(topics = {"topic.1","topic.2"}, brokerProperties = {"listeners=PLAINTEXT://localhost:9092"}, kraft = false) +public class Gh3585Tests { + + @Autowired + private EmbeddedKafkaZKBroker kafkaBroker; + + @Test + public void testEmbeddedKafkaZKBroker() { + assertThat(this.kafkaBroker.getBrokerAddress(0)).isEqualTo(new BrokerAddress("127.0.0.1", 9092)); + } + +}