Skip to content

Releases: testcontainers/testcontainers-java

1.12.5

22 Jan 22:04
2a56996
Compare
Choose a tag to compare

What's Changed

🚀 Features

🐛 Bug Fixes

  • Prevent duplicate attempts to start Ryuk container (#2245) @rnorth
  • Remove stray 'KB' suffix from docker build context size log mes… (#2214) @rnorth
  • JDBC: Fix parsing empty connection parameters (#2207) @findepi
  • Fix framing in OkHttp transport (#2155) @bsideup
  • do not implicitly connect to Kafka network (#2139) @bsideup
  • Truncate mode bits for z/OS file permissions (#2023) @aguibert
  • Fix DockerClientFactory#dockerHostIpAddress (#2119) @bsideup
  • Fix use of bash-specific /proc/net/tcp* check in InternalCommandPortListeningCheck t… (#2195) @perlun
  • Include only published projects into BOM (#2118) @bsideup

📖 Documentation

🧹 Housekeeping

📦 Dependency updates

Click to expand...

1.12.4

29 Nov 11:00
Compare
Choose a tag to compare

What's Changed

🚀 Features

🐛 Bug Fixes

  • Stabilize CouchbaseContainer by merging the Socat command (#2081) @bsideup
  • Make Startables#deepStart always iterate sequentially (#2053) @pivovarit
  • Fix session label when reuse is not supported but requested (#2051) @bsideup
  • Fix docker image name parsing bugs (#2022) @rnorth

📖 Documentation

🧹 Housekeeping

📦 Dependency updates

Click to expand...

1.12.3

26 Oct 08:41
Compare
Choose a tag to compare

What's Changed

🚀 Features

🐛 Bug Fixes

📖 Documentation

  • Added documentation example of using local Docker Compose (#1987) @jonathanvila
  • Update example dependency specified in junit_5.md (#1817) @sghill
  • Add a simple example with how to use the mock server container (#1950) @worldtiki
  • Remove hostname and port from JDBC examples to avoid confusion (#1786) @bsideup

🧹 Housekeeping

📦 Dependency updates

1.12.2

26 Sep 08:09
d3ba842
Compare
Choose a tag to compare

What's Changed

🚔 Security

  • Reduce logs in EnvironmentAndSystemPropertyClientProviderStrategy (#1913) @rnorth. This fixes an issue (#1912) whereby docker registry credentials could be logged:
    • if credentials were hardcoded in ~/.docker/config.json and
    • if Testcontainers detected environment variables/system properties (such as DOCKER_HOST) which set/override the address of the docker daemon.

We recommend that you check recent CI logs for any accidentally logged credentials, and apologise for the inconvenience. Please see below for an example of the log message, which occurs during initial connection to the Docker daemon.

INFO  o.t.d.DockerClientProviderStrategy - Found Docker environment with Environment 
variables, system properties and defaults. Resolved: 
    dockerHost=unix:///var/run/docker.sock
    apiVersion='{UNKNOWN_VERSION}'
    registryUrl='https://index.docker.io/v1/'
    registryUsername='...'
    registryPassword='...'
    registryEmail='...'
    dockerConfig='DefaultDockerClientConfig[dockerHost=
unix:///var/run/docker.sock,registryUsername=...,registryPassword=<...>,
registryEmail=<...>,registryUrl=https://index.docker.io/v1/,
dockerConfigPath=/home/user/.docker,sslConfig=<null>,
apiVersion={UNKNOWN_VERSION},dockerConfig=<null>]'

has been changed to:

INFO  o.t.d.DockerClientProviderStrategy - Found Docker environment with Environment 
variables, system properties and defaults. Resolved dockerHost=unix:///var/run/docker.sock

Other changes

📖 Documentation

📦 Dependency updates

Click to expand...

1.12.1

08 Sep 08:11
b35f2ca
Compare
Choose a tag to compare

What's Changed

🚀 Features

  • Use "copy" strategy in withClasspathResourceMapping where appropriate (#1814) @bsideup
  • Speed up listening port detection by running the checks as a single command (#1782) @bsideup
  • RabbitMQ: Support legacy RabbitMQ configuration format (#1692) @twillouer
  • Separate "environment" and "classpath" properties (for global things) (#1784) @bsideup
  • Add check for compatible Docker OS type, to fail gracefully if Docker daemon does not support Linux containers (#1780) @Casz

🐛 Bug Fixes

  • Fix credentials when using a helper that returns a token (#1734) @rszewczyk
  • Reinstate retries for image pulls (#1712) @rnorth
  • Amend container shutdown to catch and log for all Exception classes (#1663) @rnorth
  • Coordinate image removals after stopping containers (#1745) @aguibert
  • RabbitMQ: fix typo in binding command (#1792) @glefloch
  • Fix Deprecated MySQL Class Name warnings (#1760) @turackangal
  • Exclude jna transitive dependency from visible-assertions to reconcile versions (#1744) @eggilbert

📖 Documentation

🧹 Housekeeping

Click to expand...

📦 Dependency updates

Click to expand...

1.12.0

24 Jul 08:27
1010b89
Compare
Choose a tag to compare

What's Changed

🚀 Features

  • Add DB2 module (#1611) @aguibert

    As a result of our collaboration with @aguibert and @irinadel from IBM, we're happy to bring DB2 support to Testcontainers 🎉 It of course works with the JDBC URL support too! It means you can spin up a real instance of DB2 in your tests with one line: jdbc:tc:db2:///databasename.
    For more info, check the module's page: https://www.testcontainers.org/modules/databases/db2/

  • Implement dependsOn for cross-container dependencies (#1404) @bsideup

    Ever wanted to wait for container B before starting container A? We got you covered 😎

    With the new dependsOn method, it is now possible to model a graph of dependencies between your containers:

    @Rule
    KafkaContainer kafka = new KafkaContainer();
    
    @Rule
    SchemaRegistryContainer schemaRegistryContainer = new SchemaRegistryContainer("5.2.1")
            .withKafka(kafka)
            .dependsOn(kafka);
  • Improve pull handling (#1320) @rnorth

    Pulling images is sometimes a long running process. And, as with every long running process, having some sort of a visualization could help understanding what is going on!

    Before:

    11:15:50.598 INFO  🐳 [ibmcom/db2express-c:latest] - Pulling docker image: ibmcom/db2express-c:latest. Please be patient; this may take some time but only needs to be done once.
    

    Oh yeah, it will take some time 😅

    After:

    19:34:25.198 INFO  🐳 [ibmcom/db2express-c:latest] - Pulling image
    19:34:25.198 INFO  🐳 [ibmcom/db2express-c:latest] - Pulling image layers:  0 pending,  0 downloaded,  0 extracted, (0 bytes/0 bytes)
    19:34:25.967 INFO  🐳 [ibmcom/db2express-c:latest] - Pulling image layers: 12 pending,  1 downloaded,  0 extracted, (32 bytes/? MB)
    19:34:27.363 INFO  🐳 [ibmcom/db2express-c:latest] - Pulling image layers: 11 pending,  2 downloaded,  0 extracted, (1 MB/? MB)
    19:34:58.519 ERROR 🐳 [ibmcom/db2express-c:latest] - Docker image pull has not made progress in 30s - aborting pull
    19:34:58.564 ERROR 🐳 [ibmcom/db2express-c:latest] - Failed to pull image: ibmcom/db2express-c:latest. Please check output of `docker pull ibmcom/db2express-c:latest`
    

    (Note that it detected a problem with pulling and reported it, hinting you how to debug it!)

  • Add RabbitMQ module (#1449) @martingreber

    Hey, 🐰 fans! How flexible do you think RabbitMQ can be? That flexible:

      RabbitMQContainer container = new RabbitMQContainer()
              .withVhost("vhost1")
              .withVhostLimit("vhost1", "max-connections", 1)
              .withVhost("vhost2", true)
              .withExchange("direct-exchange", "direct")
              .withExchange("topic-exchange", "topic")
              .withQueue("queue1")
              .withQueue("queue2", true, false, ImmutableMap.of("x-message-ttl", 1000))
              .withBinding("direct-exchange", "queue1")
              .withUser("user1", "password1")
              .withUser("user2", "password2", ImmutableSet.of("administrator"))
              .withPermission("vhost1", "user1", ".*", ".*", ".*")
              .withPolicy("max length policy", "^dog", ImmutableMap.of("max-length", 1), 1, "queues")
              .withPolicy("alternate exchange policy", "^direct-exchange", ImmutableMap.of("alternate-exchange", "amq.direct"))
              .withOperatorPolicy("operator policy 1", "^queue1", ImmutableMap.of("message-ttl", 1000), 1, "queues")
              .withPluginsEnabled("rabbitmq_shovel", "rabbitmq_random_exchange");
  • Allow JUnit Jupiter tests to be disabled when Docker is unavailable (#1530) @wilkinsona

    Thanks to our friends from Spring Boot (who also happened to use Testcontainers a lot 😁), it is now possible to skip JUnit Platform-based tests if Docker is not available:

    @Testcontainers(disabledWithoutDocker = true)
    class SomeIntegrationTest {
      // ...
    }
  • Fail fast if container_name is set in Docker Compose file (#1581) @bsideup

    Testcontainers does not support container_name property because it breaks the service discovery, but, before this change, the tests were failing without pointing to the problem.
    Thanks to the initial work from @mumukiller, it will fail fast if the property is presented.

  • Add new withDockerfile methods to ImageFromDockerfile (#1535) @aguibert

    ImageFromDockerfile should respect the .dockerignore file from now on.

  • Enable command override for PostgreSQLContainer (#938) @kellen

  • Add container stopping and stopped hooks (#1610) @jalaziz

  • Fail gracefully if no JDBC driver found (#1434) @rnorth

  • Simplify Kafka container by deferring the Kafka command (#1458) @bsideup

🧹 Housekeeping

  • Azure Pipelines for Windows testing (#1363) @bsideup

    This one is not a feature, but an exciting change! We now test every master build (and some PRs) on Windows!

    Since it requires running a real Windows machine, we have to host it ourselves.

    P.S. consider contacting us if you have a few spare Windows nodes ;)

🐛 Bug Fixes

📖 Documentation

📦 Dependency updates

1.11.4

07 Jul 06:57
Compare
Choose a tag to compare

What's Changed

  • Deprecate fields that are derived from containerInfo (#1585) @bsideup

🚀 Features

🐛 Bug Fixes

📖 Documentation

📦 Dependency updates

Click to expand...

1.11.3

21 May 20:18
Compare
Choose a tag to compare

What's Changed

  • (JUnit 5) Add field name to ExtensionConfigurationException message (#1488) @anandProDev

🐛 Bug Fixes

📖 Documentation

📦 Dependency updates

  • Bump org.springframework.boot from 2.1.4.RELEASE to 2.1.5.RELEASE in /examples (#1471) @dependabot
  • Bump cucumber-junit from 4.3.0 to 4.3.1 in /examples (#1461) @dependabot
  • Bump tomcat-jdbc from 9.0.19 to 9.0.20 in /modules/mysql (#1468) @dependabot
  • Bump neo4j-java-driver from 1.7.3 to 1.7.4 in /modules/neo4j (#1451) @dependabot
  • Bump rest-assured from 3.3.0 to 4.0.0 in /modules/vault (#1460) @dependabot
  • Bump lombok from 1.18.6 to 1.18.8 in /examples (#1462) @dependabot
  • Bump cucumber-java from 4.3.0 to 4.3.1 in /examples (#1463) @dependabot
  • Bump org.springframework.boot from 2.1.2.RELEASE to 2.1.4.RELEASE in /examples (#1443) @dependabot
  • Bump junit-jupiter-api from 5.4.1 to 5.4.2 in /modules/junit-jupiter (#1365) @dependabot
  • Bump pulsar-client from 2.3.0 to 2.3.1 in /modules/pulsar (#1402) @dependabot
  • Bump mockito-core from 2.26.0 to 2.27.0 in /core (#1382) @dependabot
  • Bump neo4j from 3.5.4 to 3.5.5 in /modules/neo4j (#1426) @dependabot
  • Bump mysql-connector-java from 8.0.14 to 8.0.16 in /modules/mysql (#1427) @dependabot
  • Bump mysql-connector-java from 8.0.15 to 8.0.16 in /modules/junit-jupiter (#1428) @dependabot
  • Bump mysql-connector-java from 8.0.15 to 8.0.16 in /modules/spock (#1429) @dependabot

1.11.2

15 Apr 20:32
40724a0
Compare
Choose a tag to compare

What's Changed

🚀 Features

🐛 Bug Fixes

Other changes

📦 Dependency updates

  • Bump transport from 6.6.2 to 6.7.0 in /modules/elasticsearch (#1344) @dependabot[bot]
  • Bump elasticsearch-rest-client from 6.6.2 to 6.7.0 in /modules/elasticsearch (#1343) @dependabot[bot]
  • Bump neo4j from 3.5.3 to 3.5.4 in /modules/neo4j (#1368) @dependabot[bot]
  • Bump elasticsearch-rest-client from 6.7.0 to 6.7.1 in /modules/elasticsearch (#1369) @dependabot[bot]
  • Bump junit-jupiter-engine from 5.4.1 to 5.4.2 in /modules/junit-jupiter (#1364) @dependabot[bot]
  • Bump httpclient from 4.5.7 to 4.5.8 in /modules/spock (#1353) @dependabot[bot]
  • Bump httpclient from 4.5.7 to 4.5.8 in /modules/junit-jupiter (#1352) @dependabot[bot]
  • Bump httpclient from 4.5.7 to 4.5.8 in /core (#1351) @dependabot[bot]
  • Bump transport from 6.7.0 to 6.7.1 in /modules/elasticsearch (#1370) @dependabot[bot]
  • Bump mockito-core from 2.25.1 to 2.26.0 in /core (#1366) @dependabot[bot]
  • Bump amqp-client from 5.6.0 to 5.7.0 in /core (#1367) @dependabot[bot]
  • Bump kafka-clients from 2.1.1 to 2.2.0 in /modules/kafka (#1338) @dependabot[bot]
  • Bump mongo-java-driver from 3.10.1 to 3.10.2 in /core (#1374) @dependabot[bot]
  • Bump cucumber-java from 2.3.1 to 4.3.0 in /examples (#1394) @dependabot[bot]
  • Bump tomcat-jdbc from 9.0.17 to 9.0.19 in /modules/mysql (#1401) @dependabot[bot]
  • Bump tomcat-jdbc from 9.0.17 to 9.0.19 in /modules/mariadb (#1403) @dependabot[bot]

1.11.1

25 Mar 12:49
2c5f274
Compare
Choose a tag to compare

What's Changed

🚀 Features

  • Add getLogs() methods as alternative mechanism to capture container logs (#1206) @rnorth

🐛 Bug Fixes

  • Toxiproxy: Fix bug which would prevent creation of multiple proxies (#1335) @worldtiki

📦 Dependency updates

  • Bump spock-core from 1.0-groovy-2.4 to 1.3-groovy-2.5 in /modules/spock (#1291) @dependabot[bot]