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: handle both ms and s in test timings #5132

Merged
merged 2 commits into from
Dec 19, 2017

Conversation

SimenB
Copy link
Member

@SimenB SimenB commented Dec 19, 2017

Summary
We're seeing some errors from slow running tests in seconds instead of millis. This strips them out from test results in integration tests.

Test plan
Green CI

@@ -148,7 +148,7 @@ const extractSummary = (stdout: string) => {

const rest = cleanupStackTrace(
// remove all timestamps
stdout.slice(0, -match[0].length).replace(/\s*\(.*ms\)/gm, ''),
stdout.slice(0, -match[0].length).replace(/\s*\(\d*\.?\d+m?s\)/gm, ''),
Copy link
Member Author

@SimenB SimenB Dec 19, 2017

Choose a reason for hiding this comment

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

just adding m?s made a single other test fail, so this is copied from the cleanup regexp above

image

Copy link
Collaborator

Choose a reason for hiding this comment

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

Maybe worth to add a $ so we match only the end of the string?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yeah, that probably would have fixed it. added it anyways 🙂

@codecov-io
Copy link

codecov-io commented Dec 19, 2017

Codecov Report

Merging #5132 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@          Coverage Diff           @@
##           master   #5132   +/-   ##
======================================
  Coverage    60.7%   60.7%           
======================================
  Files         201     201           
  Lines        6691    6691           
  Branches        4       4           
======================================
  Hits         4062    4062           
  Misses       2628    2628           
  Partials        1       1

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update e2609bb...7a6ef51. Read the comment docs.

@cpojer cpojer merged commit e74fbff into jestjs:master Dec 19, 2017
@cpojer
Copy link
Member

cpojer commented Dec 19, 2017

Damn, CI is slow.

@SimenB SimenB deleted the strip-timing-itest branch December 19, 2017 12:00
@SimenB
Copy link
Member Author

SimenB commented Dec 19, 2017

runInBand takes quite some time... the whole (integration) test run is 70s on my machine

@thymikee
Copy link
Collaborator

We should be able to run on at least 2 or 4 cores with -w option. Anybody want to give it a try?

@github-actions
Copy link

This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Please note this issue tracker is not a help forum. We recommend using StackOverflow or our discord channel for questions.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 13, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants