Skip to content

InThreadIMDServer should bind a free port and return it rather than using get_free_port #81

Open
@ljwoods2

Description

@ljwoods2

Expected behavior

InThreadIMDServer binds a free port and makes it available somehow to the IMDClient that attempts to connect to it.

Actual behavior

InThreadIMDServer takes a port as an argument and in testing we get a port using get_free_port(). But in the space between the call to get_free_port and instantiation of the server, another process can use the free, unbound port, creating a rare but annoying race condition that will make the test fail during setup.

This impacts the core MDA codebase now, too, since the PR MDAnalysis/mdanalysis#4923 uses the test server

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions