Skip to content

Commit

Permalink
Merge pull request #11032 from qmonmert/testcontainers1202
Browse files Browse the repository at this point in the history
Fix upgrade: org.testcontainers:testcontainers-bom to v1.20.2
  • Loading branch information
murdos authored Oct 1, 2024
2 parents c2b3ece + 5fb7a83 commit f52afeb
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@
<maven-model-helper.version>37</maven-model-helper.version>
<mustache.java.version>0.9.14</mustache.java.version>
<night-config.version>3.8.1</night-config.version>
<testcontainers.version>1.20.1</testcontainers.version>
<testcontainers.version>1.20.2</testcontainers.version>
<mongock.version>5.4.4</mongock.version>
<git-commit-id-plugin.version>9.0.1</git-commit-id-plugin.version>
<maven-checkstyle-plugin.version>3.5.0</maven-checkstyle-plugin.version>
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/generator/dependencies/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
<assertj.version>3.26.3</assertj.version>
<mockito.version>5.14.1</mockito.version>
<cassandraunit.version>4.3.1.0</cassandraunit.version>
<testcontainers.version>1.20.1</testcontainers.version>
<testcontainers.version>1.20.2</testcontainers.version>
<archunit-junit5.version>1.3.0</archunit-junit5.version>
<cucumber.version>7.19.0</cucumber.version>
<approvaltests.version>24.7.0</approvaltests.version>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@ import org.springframework.boot.SpringApplication;
import org.springframework.boot.context.event.ApplicationEnvironmentPreparedEvent;
import org.springframework.context.ApplicationListener;
import org.springframework.core.Ordered;
import org.testcontainers.containers.CassandraContainer;
import org.testcontainers.cassandra.CassandraContainer;

class TestCassandraManager implements ApplicationListener<ApplicationEnvironmentPreparedEvent>, Ordered {
private static final String KEYSPACE = "{{ baseName }}";
private static CassandraContainer<?> cassandraContainer;
private static CassandraContainer cassandraContainer;
@Override
public int getOrder() {
Expand All @@ -36,7 +36,7 @@ class TestCassandraManager implements ApplicationListener<ApplicationEnvironment
}

private void registerEnvironmentVariables() {
System.setProperty("TEST_CASSANDRA_PORT", String.valueOf(cassandraContainer.getMappedPort(CassandraContainer.CQL_PORT)));
System.setProperty("TEST_CASSANDRA_PORT", String.valueOf(cassandraContainer.getFirstMappedPort()));
System.setProperty("TEST_CASSANDRA_CONTACT_POINT", getContainerIpAddress());
System.setProperty("TEST_CASSANDRA_DC", cassandraContainer.getLocalDatacenter());
System.setProperty("TEST_CASSANDRA_KEYSPACE", KEYSPACE);
Expand Down Expand Up @@ -70,7 +70,7 @@ class TestCassandraManager implements ApplicationListener<ApplicationEnvironment
}

private void createCassandraContainer() {
cassandraContainer = new CassandraContainer<>("{{ cassandraDockerImage }}");
cassandraContainer = new CassandraContainer("{{ cassandraDockerImage }}");
}

private Runnable stopContainer() {
Expand Down

0 comments on commit f52afeb

Please sign in to comment.