Skip to content

Race condition preventing successful integration tests #236

@glasnt

Description

@glasnt

There are many tests/ but one of the first ones (hooks-prepostcreate-inline) sees envvars being updated for the service.

The problem is that it appears there can be a time when the old revision is accepting requests, when the new revision should be.

In this example, there is a revision that should return "A" and a revision that should return "AB" (through inline pre- and post-create commands) We should only be testing the service after the deployment is complete, so we should be only ever returning the latest revision ("AB").

But polling the service once a second as it deploys shows there's times when "A" returns to the mix:

Mon Dec  5 04:29:51 UTC 2022
A
Mon Dec  5 04:29:54 UTC 2022
A
Mon Dec  5 04:29:56 UTC 2022
A
Mon Dec  5 04:29:57 UTC 2022
AB
Mon Dec  5 04:29:59 UTC 2022
AB
Mon Dec  5 04:30:00 UTC 2022
A
Mon Dec  5 04:30:01 UTC 2022
AB
Mon Dec  5 04:30:02 UTC 2022
AB

Pending matching against the service logs to establish it was an older revision receiving the request, etc.

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