Skip to content

Commit

Permalink
GH-737 - Work around double registry registration in AWS integration …
Browse files Browse the repository at this point in the history
…tests.

Looks like Boot 3.4 registers an addition DynamicPropertyRegistry bean.
  • Loading branch information
odrotbohm committed Jul 18, 2024
1 parent 32a7b5d commit c6c5827
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@

import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.context.ApplicationEventPublisher;
Expand Down Expand Up @@ -56,7 +57,7 @@ class SnsEventPublicationIntegrationTests {
static class TestConfiguration {

@Bean
LocalStackContainer localStackContainer(DynamicPropertyRegistry registry) {
LocalStackContainer localStackContainer(@Qualifier("dynamicPropertyRegistry") DynamicPropertyRegistry registry) {

var localstack = new LocalStackContainer(DockerImageName.parse("localstack/localstack:latest"));

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@

import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.context.ApplicationEventPublisher;
Expand Down Expand Up @@ -55,7 +56,7 @@ class SqsEventPublicationIntegrationTests {
static class TestConfiguration {

@Bean
LocalStackContainer localStackContainer(DynamicPropertyRegistry registry) {
LocalStackContainer localStackContainer(@Qualifier("dynamicPropertyRegistry") DynamicPropertyRegistry registry) {

var localstack = new LocalStackContainer(DockerImageName.parse("localstack/localstack:latest"));

Expand Down

0 comments on commit c6c5827

Please sign in to comment.