|
1 |
| -// Copyright (c) 2018, 2023 IBM Corporation and others. |
| 1 | +// Copyright (c) 2023 IBM Corporation and others. |
2 | 2 | // Licensed under Creative Commons Attribution-NoDerivatives
|
3 | 3 | // 4.0 International (CC BY-ND 4.0)
|
4 | 4 | // https://creativecommons.org/licenses/by-nd/4.0/
|
@@ -152,7 +152,7 @@ Build and run the container by running the `devc` goal with the PostgreSQL conta
|
152 | 152 | mvn liberty:devc -DdockerRunOpts="-e DB_HOSTNAME=172.17.0.2" -DserverStartTimeout=240
|
153 | 153 | ```
|
154 | 154 |
|
155 |
| -You need to wait a while to let dev mode start. After you see the following message, your application server in dev mode is ready: |
| 155 | +You need to wait a while to let dev mode start. After you see the following message, your Liberty instance is ready in dev mode: |
156 | 156 |
|
157 | 157 | [role="no_copy"]
|
158 | 158 | ----
|
@@ -230,7 +230,7 @@ The [hotspot file=0]`LibertyContainer` class extends the [hotspot=GenericContain
|
230 | 230 |
|
231 | 231 | The [hotspot=addExposedPorts1 hotspot=addExposedPorts2 file=0]`addExposedPorts(port)` method exposes specified ports from the container's perspective, allowing test clients to communicate with services running inside the container. To avoid any port conflicts, Testcontainers assigns random host ports to these exposed container ports.
|
232 | 232 |
|
233 |
| -The [hotspot=waitingFor file=0]`Wait.forLogMessage()` method directs `LibertyContainer` to wait for the specific `CWWKF0011I` log message that indicates the Liberty server has started successfully. |
| 233 | +The [hotspot=waitingFor file=0]`Wait.forLogMessage()` method directs `LibertyContainer` to wait for the specific `CWWKF0011I` log message that indicates the Liberty instance has started successfully. |
234 | 234 |
|
235 | 235 | For more information about Testcontainers APIs and its functionality, refer to the https://javadoc.io/doc/org.testcontainers/testcontainers/latest/index.html[Testcontainers JavaDocs^].
|
236 | 236 |
|
@@ -318,7 +318,7 @@ include::finish/pom.xml[]
|
318 | 318 |
|
319 | 319 | Add the required `dependency` for Testcontainers and Log4J libraries with `test` scope. The [hotspot=testcontainers file=0]`testcontainers` dependency offers a general-purpose API for managing container-based test environments. The [hotspot=slf4j file=0]`slf4j-reload4j` and [hotspot=slf4j-api file=0]`slf4j-api` dependencies enable the Simple Logging Facade for Java (SLF4J) API for trace logging during test execution and facilitates debugging and test performance tracking.
|
320 | 320 |
|
321 |
| -The Maven pom.xml file contains a configuration for the [hotspot=maven-dependency-plugin file=0]`maven-dependency-plugin` to copy the PostgreSQL JDBC driver into the Liberty server's shared resources directory. This setup occurs during the `prepare-package` phase. As a result, running the `mvn package` command ensures the PostgreSQL driver is prepared and accessible for your application when it runs on the Liberty server. |
| 321 | +The Maven pom.xml file contains a configuration for the [hotspot=maven-dependency-plugin file=0]`maven-dependency-plugin` to copy the PostgreSQL JDBC driver into the Liberty configuration's shared resources directory. This setup occurs during the `prepare-package` phase. As a result, running the `mvn package` command ensures the PostgreSQL driver is prepared and accessible for your application when it runs on the Liberty. |
322 | 322 |
|
323 | 323 | Also, add and configure the [hotspot=failsafe file=0]`maven-failsafe-plugin` plugin, so that the integration test can be run by the Maven `verify` goal.
|
324 | 324 |
|
@@ -346,9 +346,9 @@ Notice that the `Testing by dev mode or local runtime` log indicates that the te
|
346 | 346 | // =================================================================================================
|
347 | 347 | == Running tests in a CI/CD pipeline
|
348 | 348 |
|
349 |
| -Running tests in dev mode is useful for local development, but there may be times when you want to test your application in other scenarios, such as in a CI/CD pipeline. For these cases, you can use Testcontainers to run tests against a running Open Liberty server in a controlled, self-contained environment, ensuring that your tests run consistently regardless of the deployment context. |
| 349 | +Running tests in dev mode is useful for local development, but there may be times when you want to test your application in other scenarios, such as in a CI/CD pipeline. For these cases, you can use Testcontainers to run tests against a running Open Liberty instance in a controlled, self-contained environment, ensuring that your tests run consistently regardless of the deployment context. |
350 | 350 |
|
351 |
| -To test outside of dev mode, exit dev mode by pressing `CTRL+C` in the command-line session where you ran the server, or by typing `q` and then pressing the `enter/return` key. |
| 351 | +To test outside of dev mode, exit dev mode by pressing `CTRL+C` in the command-line session where you ran the Liberty, or by typing `q` and then pressing the `enter/return` key. |
352 | 352 |
|
353 | 353 | Also, run the following commands to stop the PostgreSQL container that was started in the previous section:
|
354 | 354 |
|
|
0 commit comments