@@ -26,31 +26,25 @@ What's inside
2626
2727This directory includes different canonical examples how to use those
2828components within test harnesses of custom applications using `CrateDB `_.
29- Currently, all test cases are based on JUnit 4 . This is an enumeration
29+ Currently, all test cases are based on JUnit. This is an enumeration
3030of examples you can explore here:
3131
32- - ``TestClassScope ``: Class-scoped testcontainer instance with JUnit 4 @Rule/@ClassRule integration .
33- - ``TestFunctionScope ``: Function-scoped testcontainer instance with JUnit 4 @Rule/@ClassRule integration .
32+ - ``TestClassScope ``: Class-scoped testcontainer instance with automatic setup/teardown, see ` Shared containers `_ .
33+ - ``TestFunctionScope ``: Function-scoped testcontainer instance with automatic setup/teardown, see ` Restarted containers `_ .
3434- ``TestJdbcUrlScheme ``: Database containers launched via Testcontainers "TC" JDBC URL scheme.
3535- ``TestManual ``: Function-scoped testcontainer instance with manual setup/teardown.
3636- ``TestManualWithLegacyCrateJdbcDriver ``:
3737 Function-scoped testcontainer instance with manual setup/teardown, using a custom
3838 ``CrateDBContainer ``, which uses the `legacy CrateDB JDBC driver `_.
39- - ``TestSharedSingleton `` [1] :
40- Testcontainer instance shared across multiple test classes, implemented using the Singleton pattern.
39+ - ``TestSharedSingleton ``:
40+ Testcontainer instance shared across multiple test classes, implemented using the Singleton pattern, see ` Singleton containers `_ .
4141- ``TestSharedSingletonEnvironmentVersion ``:
4242 Testcontainer instance honoring the ``CRATEDB_VERSION `` environment variable, suitable
4343 for running a test matrix on different versions of CrateDB, shared across multiple test
4444 classes.
4545- ``TestSqlInitialization ``: Demonstrate different ways how Testcontainers can run an init script after
4646 the database container is started, but before your code initiates a connection to it.
4747
48- [1]: Sometimes, it might be useful to define a container that is only started once for
49- several test classes. There is no special support for this use case provided by
50- the Testcontainers extension. Instead, this can be implemented using the Singleton
51- pattern. See also `Testcontainers » Manual container lifecycle control » Singleton
52- containers `_.
53-
5448
5549*****
5650Usage
8983.. _CrateDB : https://github.com/crate/crate
9084.. _CrateDB OCI image : https://hub.docker.com/_/crate
9185.. _legacy CrateDB JDBC driver : https://crate.io/docs/jdbc/
86+ .. _Restarted containers : https://java.testcontainers.org/test_framework_integration/junit_5/#restarted-containers
87+ .. _Shared containers : https://java.testcontainers.org/test_framework_integration/junit_5/#shared-containers
88+ .. _Singleton containers : https://java.testcontainers.org/test_framework_integration/manual_lifecycle_control/#singleton-containers
9289.. _Testcontainers for Java : https://github.com/testcontainers/testcontainers-java
9390.. _Testcontainers CrateDB Module : https://www.testcontainers.org/modules/databases/cratedb/
94- .. _Testcontainers » Manual container lifecycle control » Singleton containers : https://www.testcontainers.org/test_framework_integration/manual_lifecycle_control/#singleton-containers
0 commit comments