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

Main.js/LocationTracking.js process teardown/leak warning #373

Closed
tstirrat opened this issue Apr 6, 2020 · 9 comments · Fixed by #785
Closed

Main.js/LocationTracking.js process teardown/leak warning #373

tstirrat opened this issue Apr 6, 2020 · 9 comments · Fixed by #785
Assignees
Labels
good first issue Good for newcomers

Comments

@tstirrat
Copy link
Contributor

tstirrat commented Apr 6, 2020

Narrowed down to LocationTracking.spec.js

PASS  app/views/__tests__/LocationTracking.spec.js
  ✓ renders correctly (67ms)

  console.log app/views/LocationTracking.js:133
    Can't find crossed paths

Test Suites: 1 passed, 1 total
Tests:       1 passed, 1 total
Snapshots:   1 passed, 1 total
Time:        2.755s, estimated 4s
Ran all test suites matching /locationtracking/i.

Watch Usage: Press w to show more.A worker process has failed to exit gracefully and has been force exited. This is likely caused by tests leaking due to improper teardown. Try running with --runInBand --detectOpenHandles to find leaks.

Something is not doing async or teardown correctly.

@kenpugsley
Copy link
Collaborator

Not necessarily easy, but a good issue for someone new wanting to join the dev team.

@lewisPrescott707
Copy link
Contributor

I can take a look at this one? I am a QA by trade, so would be interested in looking at this one

@summetj
Copy link
Collaborator

summetj commented May 4, 2020

@lewisPrescott707 - All yours. Note that a lot has happened to the codebase in the last month, so verify the issue still exists.

@lewisPrescott707
Copy link
Contributor

lewisPrescott707 commented May 7, 2020

Been looking at this for a little while now and can't find the issue. Running --detectOpenHandles doesn't return anything.

Found this Jest Issue, could we add --forceExit like suggested?

@summetj @kenpugsley @tstirrat

@tstirrat
Copy link
Contributor Author

tstirrat commented May 7, 2020

I'd prefer not to add a "hammer" solution.. vs trying to identify/mock each dependency and use jest.useFakeTimers() etc.

Note that since #749 we care more about tests working in Main.js and the sub components in main/*, as LocationTracking.js will be removed soon enough.

@tstirrat
Copy link
Contributor Author

tstirrat commented May 7, 2020

@lewisPrescott707 could you add some tests around the components in main/* and see if this issue still shows?

the recent component separation may help us isolate the problem to a specific view and dependency.

@tstirrat tstirrat changed the title LocationTracking.spec.js process teardown/leak warning Main.js/LocationTracking.js process teardown/leak warning May 7, 2020
@tstirrat
Copy link
Contributor Author

tstirrat commented May 7, 2020

If the warning doesn't show anymore, we can commit those tests and close this

@lewisPrescott707
Copy link
Contributor

lewisPrescott707 commented May 9, 2020

Found the specific dependency causing the leak, by adding tests for main/, they helped me isolate it!! Thanks @tstirrat

@summetj
Copy link
Collaborator

summetj commented May 9, 2020

Found the specific dependency causing the leak, by adding tests for main/, they helped me isolate it!! Thanks @tstirrat

Great work, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
None yet
4 participants