Skip to content

Commit

Permalink
Init emulator in BeforeClass
Browse files Browse the repository at this point in the history
  • Loading branch information
vpaturet committed May 15, 2024
1 parent 36be741 commit 8d8f19e
Showing 1 changed file with 8 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 8d8f19e

Please sign in to comment.