-
Notifications
You must be signed in to change notification settings - Fork 116
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
feat: make router-tests less flaky #1484
base: main
Are you sure you want to change the base?
Conversation
Router image scan passed✅ No security vulnerabilities found in image:
|
…ss-flaky # Conflicts: # router-tests/go.mod # router-tests/go.sum
…ss-flaky # Conflicts: # router-tests/testenv/testenv.go
res, err := xEnv.MakeGraphQLRequestWithContext(context.Background(), testenv.GraphQLRequest{ | ||
Query: `{ employees { id } }`, | ||
}) | ||
require.NoError(t, err) | ||
require.Equal(t, res.Response.StatusCode, 200) | ||
require.Equal(t, `{"errors":[{"message":"Failed to fetch from Subgraph 'employees'."}],"data":{"employees":null}}`, res.Body) | ||
assert.Equal(t, res.Response.StatusCode, 200) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do we use assert
, rather than require
here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
From what I know, you should use the require only if you don't want the next assertion to run. In this instance I wanted to see the next assertion result to help me debug the issue when the test fails.
Motivation and Context
This is the second batch of fixes to reduce the flaky tests. In this PR I focused on:
Checklist