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 without forking_test_runner #122

Closed
wants to merge 1 commit into from

Conversation

bquorning
Copy link
Member

Plain tests run in ~1 second on my machine, as opposed to ~3 seconds before. The forking_test_runner gem was introduced in fa0ea22 with the message “forking runner for better converage.” Curiously, the Singlecov numbers didn't change in that commit, and I don't know how coverage would be affected.

Of course, running each test in its own fork avoid pollution between tests. I don't think that is an issue here, mainly because it wasn't mentioned when the gem was added.

Plain tests run in ~1 second on my machine, as opposed to ~3 seconds before.
The forking_test_runner gem was introduced in fa0ea22
with the message "forking runner for better converage". Curiously, the
Singlecov numbers didn't change in that commit, and I don't know how coverage
would be affected.

Of course, running each test in its own fork avoid pollution between tests. I
don't think that is an issue here, mainly because it wasn't mentioned when the
gem was added.
@bquorning bquorning requested a review from grosser November 17, 2023 22:48
@grosser
Copy link
Contributor

grosser commented Nov 18, 2023

it helps with

  • pollution
  • any kind of "this test does not run when run alone"
  • coverage assertion "coverage is missing when I run this test alone but works when running all"

... so prefer keeping it or looking into parallel execution/preloading helper

@bquorning
Copy link
Member Author

any kind of "this test does not run when run alone"

I actually enjoy that kind of test failures. Sometimes it’s an indication of some weird underlying issue (e.g. global variables / class instance variables) which could point to a potential problem with threading etc.

coverage assertion "coverage is missing when I run this test alone but works when running all"

Coverage should probably only be calculated on CI anyway 😅

@bquorning bquorning closed this Nov 20, 2023
@bquorning bquorning deleted the bquorning/simpler-testing branch November 20, 2023 10:40
@grosser
Copy link
Contributor

grosser commented Nov 20, 2023

Coverage should probably only be calculated on CI anyway 😅

The idea of single_cov is that it should not be, you add code without test -> local/fast failure with "line 14 is not covered"

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