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

test: fix flaky form feedback test again #2241

Merged
merged 1 commit into from
Jun 23, 2021
Merged

Conversation

mantariksh
Copy link
Contributor

Problem

One of the unit tests for form feedback is still flaky despite many attempts to fix it (#1620, #2217).

Solution

I finally realised that the array of form feedback returned is inherently non-deterministic. This is because form feedback with identical timestamps can be returned in any order, but the service being tested subsequently adds an index key depending on the order. This means there is no way for the test to exactly predict what the contents of the form feedback array should look like.

The solution was to omit the index key when checking for the shape of the form feedback array.

@mantariksh mantariksh requested a review from karrui June 23, 2021 03:29
Copy link
Contributor

@karrui karrui left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

😢

@mantariksh mantariksh merged commit d147ecc into develop Jun 23, 2021
@karrui karrui mentioned this pull request Jun 24, 2021
@mantariksh mantariksh deleted the test/flaky-feedback-2 branch July 28, 2021 08:25
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