Skip to content

Use a lookup key based on the container request to find containers to be reused #568

@mdelapenya

Description

@mdelapenya
    > The fix makes sense from a technical perspective. However, regarding the `reuse` behavior itself, we decided in `testcontainers-java` that relying on the container name is not a stable indicator of equality(with the name itself potentially leading to conflicts) and we, therefore, use the hash of the container create command as the lookup key.

@kiview what do you think if we proceed with the merge, and create a discussion/issue to refactor how the reuse container feature works: if I understood correctly, a container should be reused if and only if the container request (Go abstraction) is exactly the same, identified by a unique hash of the struct representing the request.

Originally posted by @mdelapenya in #558 (comment)

Metadata

Metadata

Assignees

No one assigned

    Labels

    choreChanges that do not impact the existing functionality

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions