Skip to content
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

Fix flakyness of the tests in client_test.go #3551

Closed
olegbespalov opened this issue Aug 19, 2023 · 1 comment · Fixed by #3554
Closed

Fix flakyness of the tests in client_test.go #3551

olegbespalov opened this issue Aug 19, 2023 · 1 comment · Fixed by #3554
Assignees

Comments

@olegbespalov
Copy link
Contributor

olegbespalov commented Aug 19, 2023

What?

Unfortunately, our GRPC tests are flaky, and currently, in most cases, the test pipeline will fail with errors like (but generally check the latest piplines):

Error:   "GoError: context deadline exceeded: connection error: desc = \"transport: failed to write client preface: write tcp 127.0.0.1:55164->127.0.0.1:43483: write: connection reset by peer\" at reflect.methodValueCall (native)" does not contain "remote error: tls: bad certificate"

The affected tests belong to the client_test.go e.g. TestClient_TlsParameters

We need to investigate and fix the tests.

The grafana/k6 is also affected, so once the fix is found and applied, it should be backported back to the main k6 repository.

Why?

These flaky tests decrease the trust in the test suite and generally hurt the developer experience.

@olegbespalov
Copy link
Contributor Author

After some investigation, I found that negative path tests rely on the timeout, like the test uses the wrong certificate, and we expect to get the error message, but it happens only when the timeout happens (context canceled).

After chasing the case, I think that the root cause of the issue is that the grpc library isn't treating such errors as permanent ones and is trying to retry. So I've ended up opening the issue grpc/grpc-go#6593

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants