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

Stop E2E tests from hanging on failure #162566752 #199

Merged
merged 5 commits into from Mar 27, 2019

Conversation

akegan
Copy link
Contributor

@akegan akegan commented Mar 19, 2019

This commit also upgrades jest and removes use of fake timers

Pivotal ticket: https://www.pivotaltracker.com/story/show/162566752

As part of my testing to figure out why tests were hanging, I tried removing use of fake timers, which closes out this ticket too: https://www.pivotaltracker.com/story/show/162182016

This commit also upgrades jest and removes use of fake timers
@exygy-dev exygy-dev temporarily deployed to dahlia-lap-full-pr-199 March 19, 2019 23:03 Inactive
@akegan
Copy link
Contributor Author

akegan commented Mar 19, 2019

Testing for this is checking that

  1. If E2E tests have an issue, they fail at ~12-15 minutes (instead of running for over 45 mins)
  2. If E2E tests pass, semaphore passes them!

Conveniently, tests are failing everywhere on partners right now 😄

@@ -66,10 +66,8 @@
},
"scripts": {
"unit": "jest --testPathPattern=.*.test.js$ --coverage",
"e2e": "jest --testPathPattern=.*e2e.* --runInBand",
"e2e": "jest --testPathPattern=.*e2e.* --runInBand. --forceExit",
Copy link
Contributor Author

Choose a reason for hiding this comment

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

adding this forceExit is what caused it to actually exit. I tried using --detectOpenHandles to determine what was wrong (which required the upgrade to 23.x), but it didn't return any results.

Based on comments on jestjs/jest#1456, it seems like it's possible that the issue is not uncommon! and that --runInBand may be the culprit.

I tried running the tests in parallel, but ended up with a lot of salesforce auth errors from trying to sign in at the same time.

This was due to an update made in Jest v23
@akegan akegan temporarily deployed to dahlia-lap-full-pr-199 March 19, 2019 23:10 Inactive
Copy link
Contributor

@software-project software-project left a comment

Choose a reason for hiding this comment

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

Looks good. All e2e test passed locally.

@akegan akegan temporarily deployed to dahlia-lap-full-pr-199 March 26, 2019 19:56 Inactive
@akegan akegan temporarily deployed to dahlia-lap-full-pr-199 March 26, 2019 20:21 Inactive
@akegan
Copy link
Contributor Author

akegan commented Mar 26, 2019

I'm not going to fix the code climate issues, but I am waiting for semaphore job to pass

@codeclimate
Copy link

codeclimate bot commented Mar 26, 2019

Code Climate has analyzed commit eb10e62 and detected 2 issues on this pull request.

Here's the issue category breakdown:

Category Count
Duplication 2

The test coverage on the diff in this pull request is 100.0% (50% is the threshold).

This pull request will bring the total coverage in the repository to 76.8%.

View more on Code Climate.

@akegan
Copy link
Contributor Author

akegan commented Mar 27, 2019

merging despite code climate duplication warnings

@akegan akegan merged commit 53d0ed5 into master Mar 27, 2019
@akegan akegan deleted the chores/prevent-e2e-test-hanging-#162566752 branch March 27, 2019 15:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants