java.lang.Object
io.helidon.data.sql.testing.TestContainerHandler
This is an internal object needed to reconfigure the environment once a container is started.
-
Method Summary
Modifier and TypeMethodDescriptionconfig()
Get the current correct config.int
The port as configured in the database URL before the container is started.Set the new configuration with mapped port.int
Start the container, and return the mapped port.void
Stop the container.
-
Method Details
-
startContainer
public int startContainer()Start the container, and return the mapped port.- Returns:
- container port that was originally configured in the URI, which must be the default port of that database
-
setConfig
Set the new configuration with mapped port. Uses the original configuration that was used to configure the container.- Returns:
- the new config instance
-
config
Get the current correct config. If the container is started, the config will contain updated port for the database URL.- Returns:
- updated config
-
originalPort
public int originalPort()The port as configured in the database URL before the container is started. This must be the default port of the database that is used, as it is used to obtain the mapped port.- Returns:
- original DB port
-
stopContainer
public void stopContainer()Stop the container.
-