Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: wait for graphql to be healthy in client tests (#1044)
The existing `test-infra` make target calls `docker compose up` to set up the various services needed for the Python client tests to run successfully. This change forces `docker compose up` to wait until the `graphql-engine` service is healthy before it exits. I borrowed the healthcheck test from another similar docker compose service in this and the corresponding backend repo. I added a wait timeout so that our runners cannot hang indefinitely on this step. The [`docker compose up` docs](https://docs.docker.com/reference/cli/docker/compose/up/) are not totally clear, but I assume `--wait-timeout` is specified in seconds because `--timeout` is specified as such. I chose 300 seconds because this step takes about 30 seconds on my fairly speedy laptop, so multiplying by 10 for a random GitHub Actions runner seems reasonable. As this is a fix for a flakey test, it's hard to be confident that this is a definitive fix. However, I can consistently reproduce the flakey error by running `make test-infra && make test` after stopping the corresponding docker containers. After the changes here, I cannot reproduce the error. Closes #942
- Loading branch information