Skip to content

Commit

Permalink
No port reuse
Browse files Browse the repository at this point in the history
  • Loading branch information
tstavinoha committed Jun 17, 2021
1 parent e5de065 commit efe7e84
Show file tree
Hide file tree
Showing 12 changed files with 16 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ void shouldCreateContainerWithStaticPort() {
@Test
void shouldResolveHostInUrl() {
// then
then(environment.getProperty(CLICKHOUSE_URL_PROPERTY_NAME)).isEqualTo("jdbc:clickhouse://localhost:5000");
then(environment.getProperty(CLICKHOUSE_URL_PROPERTY_NAME)).isEqualTo("jdbc:clickhouse://localhost:5001");
}

}
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
spring:
datasource:
clickhouse:
jdbc-url: jdbc:clickhouse://<host>:5000
jdbc-url: jdbc:clickhouse://<host>:5001

testcontainers:
clickhouse:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ void shouldCreateContainer() throws InterruptedException, ExecutionException, Ti
@Test
void shouldResolveHostInUrl() {
// then
then(kafkaProperties.getBootstrapServers()).containsExactly("localhost:5001");
then(kafkaProperties.getBootstrapServers()).containsExactly("localhost:5002");
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@ spring:
consumer:
groupId: static
autoOffsetReset: earliest
bootstrap-servers: <host>:5001
bootstrap-servers: <host>:5002

testcontainers.kafka.topics: test-topic:1:1
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ void shouldReplaceHostInJdbcUrl() {
String actual = environment.getProperty("spring.datasource.url");

// then
then(actual).contains("localhost:5000");
then(actual).contains("localhost:5003");
}

@Test
Expand All @@ -57,7 +57,7 @@ void shouldReplaceHostInR2dbc() {
String actual = environment.getProperty("spring.r2dbc.url");

// then
then(actual).contains("localhost:5000");
then(actual).contains("localhost:5003");
}

@Test
Expand All @@ -66,7 +66,7 @@ void shouldReplaceHostInFlyway() {
String actual = environment.getProperty("spring.flyway.url");

// then
then(actual).contains("localhost:5000");
then(actual).contains("localhost:5003");
}

private Driver getDriver(String jdbcUrl) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
spring:
datasource:
url: jdbc:sqlserver://<host>:5000;database=MicrosoftDriverTestDatabase
url: jdbc:sqlserver://<host>:5003;database=MicrosoftDriverTestDatabase
r2dbc:
url: r2dbc:pool:mssql://<host>:5000/InfobipSpringDataJdbcQuerydslTest
url: r2dbc:pool:mssql://<host>:5003/InfobipSpringDataJdbcQuerydslTest
flyway:
url: jdbc:sqlserver://<host>:5000;database=MicrosoftDriverTestDatabase
url: jdbc:sqlserver://<host>:5003;database=MicrosoftDriverTestDatabase
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ void shouldReplaceHostInJdbcUrl() {
String actual = properties.getUrl();

// then
then(actual).contains("localhost:5000");
then(actual).contains("localhost:5004");
}

private Driver getDriver(String jdbcUrl) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
spring:
datasource:
url: jdbc:postgresql://<host>:5000/TestDatabase
url: jdbc:postgresql://<host>:5004/TestDatabase
username: test
password: test

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ void shouldInitialize() {
@Test
void shouldUseStaticPort() {
// then
then(rabbitProperties.getAddresses()).contains("localhost:5000");
then(rabbitProperties.getAddresses()).contains("localhost:5005");
}

}
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
spring:
rabbitmq:
port: 5000
port: 5005
docker:
image: rabbitmq:3.6.14-alpine
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ void shouldCreateContainer() {
@Test
void shouldSetHostInProperties() {
// then
then(redisProperties.getUrl()).contains("localhost:5000");
then(redisProperties.getUrl()).contains("localhost:5006");
}

}
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
spring:
redis:
url: redis://<host>:5000
url: redis://<host>:5006

0 comments on commit efe7e84

Please sign in to comment.