Skip to content

Commit 6046fea

Browse files
committed
Add Azure Event Hubs Emulator container to Azure module
- Polish Signed-off-by: Esta Nagy <[email protected]>
1 parent 376617f commit 6046fea

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

modules/azure/src/main/java/org/testcontainers/azure/AzureEventHubsEmulatorContainer.java

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ public class AzureEventHubsEmulatorContainer extends GenericContainer<AzureEvent
3232
"mcr.microsoft.com/azure-messaging/eventhubs-emulator"
3333
);
3434

35-
private AzuriteContainer azuriteContainer;
35+
private final AzuriteContainer azuriteContainer;
3636

3737
private Transferable config;
3838

@@ -48,7 +48,7 @@ public AzureEventHubsEmulatorContainer(
4848
super(dockerImageName);
4949
dockerImageName.assertCompatibleWith(DEFAULT_IMAGE_NAME);
5050
this.azuriteContainer = azuriteContainer;
51-
dependsOn(azuriteContainer);
51+
dependsOn(this.azuriteContainer);
5252
waitingFor(Wait.forLogMessage(".*Emulator Service is Successfully Up!.*", 1));
5353
withExposedPorts(DEFAULT_AMQP_PORT);
5454
}
@@ -85,11 +85,10 @@ public AzureEventHubsEmulatorContainer enableKafka() {
8585

8686
@Override
8787
protected void configure() {
88-
dependsOn(azuriteContainer);
8988
final String azuriteHost = azuriteContainer.getNetworkAliases().get(0);
9089
withEnv("BLOB_SERVER", azuriteHost);
9190
withEnv("METADATA_SERVER", azuriteHost);
92-
// If license was not accepted programatically, check if it was accepted via resource file
91+
// If license was not accepted programmatically, check if it was accepted via resource file
9392
if (!getEnvMap().containsKey("ACCEPT_EULA")) {
9493
LicenseAcceptance.assertLicenseAccepted(this.getDockerImageName());
9594
acceptLicense();
@@ -99,7 +98,7 @@ protected void configure() {
9998
withCopyToContainer(this.config, "/Eventhubs_Emulator/ConfigFiles/Config.json");
10099
}
101100
if (this.useKafka) {
102-
//Kafka must use the default port or the advertised port won't match
101+
//Kafka must expose with the fixed default port or the broker's advertised port won't match
103102
this.addFixedExposedPort(DEFAULT_KAFKA_PORT, DEFAULT_KAFKA_PORT);
104103
}
105104
}

0 commit comments

Comments
 (0)