Add a new `TestcontainersStartup.start` static method and update the
existing start methods so that `Startable.start()` is only called when
the container is not already running.
Prior to this commit, we assumed that `Startable.start()` calls were
idempotent and could be safely made multiple times. Whilst this appears
to be true for stock `GenericContainer` based startables, users may have
their own `start()` method that does not expect to be called multiple
times.
The implemented detection logic will not be applied if a `Startable`
is not also a `Container`. In these cases, the implementation will need
to deal directly with multiple `start()` calls.
Fixed gh-43253
This commit review the original upgrade to retain compatiblity with the
deprecated Cassandra and ConfluentKafka containers.
This commit also fixes the SSL Cassandra tests. The new container uses
a custom wait strategy that uses plain text and does not work with an
SSL container.
Closes gh-42670
Co-authored-by: Moritz Halbritter <moritz.halbritter@broadcom.com>
This partially reverts commit 4d4b189cce.
The changes to main code are no longer needed as Framework's test
context framework no longer defines a DynamicPropertyRegistry bean. The
changes to test code have been kept to verify that @SpringBootTest and
TestcontainersPropertySourceAutoConfiguration continue to work in
combination.
Closes gh-42275
Otlp Tracing's exporter is configured using Transport. Current support
for service connections read the mapped port for HTTP transport 4318.
This commits adds support to read port for GRPC transport 4317.
See gh-41333
Prior to this commit, a Testcontainer that was managed as a bean
would not have been started in time if it was accessed before
the bean factory's configuration had been frozen. A common way
for this to occur is when using JPA. The entity manager factory
bean is LoadTimeWeaverAware which causes it to be created before
configuration is frozen. Creating this bean requires the DataSource
which in turn requires the JdbcConnectionDetails and its JDBC URL.
Getting the JDBC URL From the connection details requires the
container hosting the SQL database to have been started.
This commit updates ContainerConnectionDetails, the super-class for
all Testcontainer-based ConnectionDetails implementations, to publish
an event when the Container is retrieved from the details. When this
event is published, TestcontainersLifecycleBeanPostProcessor
initializes all containers that are defined as beans.
Closes gh-40585