diff --git a/src/test/java/no/entur/uttu/export/messaging/MessagingServiceTest.java b/src/test/java/no/entur/uttu/export/messaging/MessagingServiceTest.java index d29cdf03..0af864ec 100644 --- a/src/test/java/no/entur/uttu/export/messaging/MessagingServiceTest.java +++ b/src/test/java/no/entur/uttu/export/messaging/MessagingServiceTest.java @@ -63,15 +63,19 @@ public class MessagingServiceTest extends UttuIntegrationTest { @DynamicPropertySource static void emulatorProperties(DynamicPropertyRegistry registry) { + registry.add( + "spring.cloud.gcp.pubsub.emulator-host", + pubsubEmulator::getEmulatorEndpoint + ); + } + + @BeforeClass + public static void init() { pubsubEmulator = new PubSubEmulatorContainer( DockerImageName.parse("gcr.io/google.com/cloudsdktool/cloud-sdk:emulators") ); pubsubEmulator.start(); - registry.add( - "spring.cloud.gcp.pubsub.emulator-host", - pubsubEmulator::getEmulatorEndpoint - ); } @AfterClass