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

[CORL-2882] Fix flaky and slow CommentContainer tests #4317

Merged
merged 2 commits into from
Aug 17, 2023

Conversation

nick-funk
Copy link
Contributor

@nick-funk nick-funk commented Aug 14, 2023

What does this PR do?

Simplifies the stream structure for the render username and body test in CommentContainer.spec.tsx that was timing out and acting flaky.

Because the default story fixture provided to the createTestRenderer was quite large, it was taking a long time to render the DOM inside Jest (more than 1 minute locally).

Since we have large stream logic tests elsewhere already, I made a simple story that only has one comment for this specific test which now renders in less than 5 seconds locally.

These changes will impact:

  • commenters
  • moderators
  • admins
  • developers

What changes to the GraphQL/Database Schema does this PR introduce?

None

Does this PR introduce any new environment variables or feature flags?

No

If any indexes were added, were they added to INDEXES.md?

No new indices.

How do I test this PR?

Check CI or run npm run test and see that it passes.

Where any tests migrated to React Testing Library?

No

How do we deploy this PR?

No special considerations.

Make a simple stream with one comment so that the test
renderer can initiate faster and avoid stalling out on
GitHub CI.

Based on my experiments, this makes the test pass and also
speeds it up by a factor of more than 10x.
@netlify
Copy link

netlify bot commented Aug 14, 2023

Deploy Preview for gallant-galileo-14878c canceled.

Name Link
🔨 Latest commit 53ece0a
🔍 Latest deploy log https://app.netlify.com/sites/gallant-galileo-14878c/deploys/64da8388c678350008eae3dd

@tessalt tessalt added this pull request to the merge queue Aug 17, 2023
Merged via the queue into develop with commit 6c69a34 Aug 17, 2023
7 checks passed
@tessalt tessalt deleted the fix/CORL-2882-flaky-slow-test branch August 17, 2023 17:27
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.

3 participants