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 Flaky Order of Directive Validation #635

Conversation

dackroyd
Copy link
Contributor

@dackroyd dackroyd commented Apr 3, 2024

Due to the use of a map behind the directiveNames, iterating over them is done in random order. When there are multiple directives that are duplicated, the order of errors can change between runs, and be inconsistent with the expecated result.

This issue is also the case for other types which use a map to validate names, however the other cases currently have no tests validating this condition. To resolve the immediate issue of flaky tests, addressing just the directives case for now. Resolution of other cases should be accompanied by tests exposing the issue.

Due to the use of a map behind the directiveNames, iterating over them is done
in random order. When there are multiple directives that are duplicated, the
order of errors can change between runs, and be inconsistent with the
expecated result.

This issue is also the case for other types which use a map to validate names,
however the other cases currently have no tests validating this condition. To
resolve the immediate issue of flaky tests, addressing just the directives case
for now. Resolution of other cases should be accompanied by tests exposing the
issue.
@pavelnikolov pavelnikolov merged commit 6029c30 into graph-gophers:master Apr 3, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants