Skip to content

Intermittent test failures in CI #287

@tschneidereit

Description

@tschneidereit

On the last merge to main we had an intermittent test failure. The test passed on a manually triggered re-run.

@vados-cosmonic it seems like this is due to getRandomPort not waiting for the temporary server it creates to be closed before reporting the port.

However, I think there's a fundamental race condition here: either we have the race seen in this test failure, or we have a potential race between this and another test, where that other test might steal the port between the temporary server shutting down and our test server starting up.

That second one is probably less likely, but I'm not sure. A way to avoid either would be to not create a temporary server at all: why not create the actual test server in the global script instead of the test function, and return its port once it got created?

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingtestsRelated to or an improvement on test

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions