Skip to content

Misleading logs about starting reused container #4843

@pkubowicz

Description

@pkubowicz

If you correctly set up container reuse, test logs will claim a new container is started:

🐳 [mongo:4.4.10]                        : Creating container for image: mongo:4.4.10
🐳 [mongo:4.4.10]                        : Reusing container with ID: b86fee00345ba5f5a00afa774485bccf4e28477a310149d6ee1d6c8d1417606d and hash: 473d0fa21a22938b3ae0330a600050559c4a2be7
🐳 [mongo:4.4.10]                        : Container mongo:4.4.10 is starting: b86fee00345ba5f5a00afa774485bccf4e28477a310149d6ee1d6c8d1417606d
🐳 [mongo:4.4.10]                        : Container mongo:4.4.10 started in PT0.193984S

Nothing is actually started and everything is ok. But looking at logs, you may think you failed to configure reusing correctly. Or that there is a bug in Testcontainers and it starts a copy.

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