The AtomicJar team
Testcontainers Cloud

Terminate workers eagerly when tests finish

AUTHOR: The AtomicJar team

By default, Testcontainers Cloud workers remain active for a certain period of inactivity before they shutdown to provide a smooth user experience, particularly on desktop. In CI pipelines it's often possible to know that a pipeline or job will no longer need access to its Testcontainers Cloud worker(s) once it completes. In such cases, it's possible to optimize usage by eagerly terminating worker(s) on agent shutdown.

Starting with version 1.3.31 or later of the agent, simply start the agent with the --terminate flag and it will automatically end associated workers on shutdown. Alternatively, you can call the terminate command while the agent is running, for example via

Powered by LaunchNotes