-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Race condition in make test-docker
#127
Comments
Hrm, I understand why this could be a problem, but I'm not seeing it locally. We also run these tests daily and not seeing any issues:
Is there some other piece that I'm missing which is causing the failure for you? |
My best guess is my local environment contributes to it? I've got a souped up M1 Max and 1gb fiber. AIUI, this failure only occurs if
In this past execution, you can see that this race was narrowly lost, Prism starts up ~6s before the tests start executing: |
Makes sense, will take a look at the PR. |
Issue Summary
When running
make test-docker
locally, the first test executed by Go,TestGet
, failed reliably.When inspecting the logs from
docker-compose
, the Prism startup output was emitted long after the go tests executed and failed.This makes me suspect that what I'm encountering is a startup issue where the Prism container isn't ready to accept requests before the go tests begin.
Mitigation suggestions are here: https://docs.docker.com/compose/startup-order/
Steps to Reproduce
make test-docker
docker-compose logs -f
fromexamples/prism/
to see log outputException/Log
I added a log to better inspect the error occurring:
Which then yielded this error:
prism-go-client-test-1 | {"Time":"2022-04-18T18:49:46.703409863Z","Action":"output","Package":"go-client/helper/rest/api/v2010","Test":"TestGet","Output":" api_test.go:31: err: Get \"http://prism_twilio:4010/v1/Credentials/AWS\": dial tcp 172.24.0.2:4010: connect: connection refused\n"}
Technical details:
main
)The text was updated successfully, but these errors were encountered: