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

tweak jest config and usage #476

Merged
merged 1 commit into from
Oct 27, 2021
Merged

tweak jest config and usage #476

merged 1 commit into from
Oct 27, 2021

Conversation

thewatermethod
Copy link
Collaborator

@thewatermethod thewatermethod commented Oct 26, 2021

Description of change

We've experienced Jest continuously timing out and/or running out of memory when trying to run unit tests.

This PR contains two configuration changes that attempt to partially address this behavior

  • Add two parameters to our jest execution on the frontend. --detectOpenHandles & --forceExit. There was one example in a GitHub issue of a memory leak where strings representing transpiled files where being stored and not deleted between tests. I also added --silent to make the output a bit more readable when trying to observe logged heap usage.
  • Manually call the node garbage collector after each test.

These open issues helped guide me to these solutions

At this point it's unclear whether this is some larger issue with our configuration, or if its an issue with certain tests, or an issue with current versions of our dependencies. Multiple attempts to diagnose the problem largely failed.

This should probably be considered a temporary, stopgap measure, and this problem should be revisited.

How to test

Issue(s)

Checklists

Every PR

  • Meets issue criteria
  • JIRA ticket status updated
  • Code is meaningfully tested
  • Meets accessibility standards (WCAG 2.1 Levels A, AA)
  • API Documentation updated
  • Boundary diagram updated
  • Logical Data Model updated
  • Architectural Decision Records written for major infrastructure decisions

Production Deploy

  • Staging smoke test completed

After merge/deploy

  • Update JIRA ticket status

@thewatermethod thewatermethod marked this pull request as ready for review October 26, 2021 20:47
@thewatermethod thewatermethod changed the title tweak config tweak jest config and usage Oct 26, 2021
Copy link

@jasalisbury jasalisbury left a comment

Choose a reason for hiding this comment

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

Can you write a ticket marked tech debt and point to this PR? It is interesting the heap size looks to be growing still in CI but no OOM.

@jasalisbury jasalisbury mentioned this pull request Oct 27, 2021
10 tasks
@thewatermethod thewatermethod merged commit bcef212 into main Oct 27, 2021
@thewatermethod thewatermethod deleted the test-cleanup-mb-10-28 branch October 27, 2021 16:54
@thewatermethod
Copy link
Collaborator Author

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