Skip to content

Feature Request: write container id to .tmp file #634

Closed

Description

@slavniyteo

Hi, thank you for awesom development tool.

We use testcontainers in spring-based microservices mostly for launching PostgresQL database. It is enough to use jdbc-url based configuration for us. Also usually we run containers in daemon mode.

Sometimes when I run tests on my machine and then interrupt them (with Ctrl+C, for example), launched container doesn't stop. This is expected because process didn't stop gracefully.

But while it is ok on local machine, it becomes a trouble on CI agents. I noticed many zombie postgres containers on CI agent machines. Probably it hapens because of OutOfMemory on agents (it happens seldom, but it does), probably because of #253 (see the last comment) or something else.

Anyway it seems useful to store launched containers to have an ability to stop them automatically in exceptional cases.

Activity

  1. bsideup commented on Apr 4, 2018

    @bsideup
    Member

    Hi @slavniyteo,

    Did you try version 1.6.0? There is a new feature called "Death note" ( See #545 ) for that. Even if you kill -9 your process, the containers will get cleaned.

    FYI there is also org.testcontainers=true label on containers started with Testcontainers

  2. slavniyteo commented on Apr 5, 2018

    @slavniyteo
    Author

    Wow, DeathNote works nice, thank you for a quick answer.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions