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

Minitest broken? after 0.18.3 #883

Closed
adam12 opened this issue Mar 22, 2020 · 5 comments
Closed

Minitest broken? after 0.18.3 #883

adam12 opened this issue Mar 22, 2020 · 5 comments

Comments

@adam12
Copy link
Contributor

adam12 commented Mar 22, 2020

I know this is getting tiresome, but after we implemented the fix in #874 and #875, it's broken again, at least with an app I'm using. The coverage is generated immediately, before the Minitest at_exit hook runs.

But it's obviously not completely broken since the spec's are passing, so we're in a Minitest mystery.

I'll try to look when I get some time; maybe it's a race condition on which library is loaded first? I haven't been able to reproduce it other than 0.18.3 is good, 0.18.4 is broken (in this app anyways).

ruby 2.6.5p114 (2019-10-01 revision 67812) [x86_64-freebsd12.0]
minitest (5.14.0)
simplecov (0.18.5)
@PragTob
Copy link
Collaborator

PragTob commented Mar 22, 2020

😭

I mean... we have a functioning feature spec so it might be misconfiguration/race conditon and at least not entirely broken. Or so I think, trusting the tests.

Thanks for the report anyhow! :)

@adam12
Copy link
Contributor Author

adam12 commented Mar 23, 2020

False alarm, kinda.

In this project, I'm using a non-released test helper for Minitest. It seems it does things differently vs TestTask from Rake.

# Rakefile
require_relative "lib/minitest/test_task"
Minitest::TestTask.create

Using the Rake TestTask or a Ruby test file directly still appears to function as expected.

Closing for now.

@adam12 adam12 closed this as completed Mar 23, 2020
@PragTob
Copy link
Collaborator

PragTob commented Mar 23, 2020

@adam12 thank you!

I mean.. if that one is scheduled to be released/something people use then we should try working to fix it... if not with the highes tpriority but it does seem kinda important :)

@adam12
Copy link
Contributor Author

adam12 commented Mar 23, 2020

I think there was talks of it being released but I haven't heard anything further. I was looking for something better to run my tests and had been experimenting with it (alongside minitest-sprint which might suffer the same issue).

@hainesr
Copy link

hainesr commented Sep 4, 2022

Just FYI, I've run into this issue as well. SimpleCov any later than 0.18.3 (when using the Minitest Rake test task - not the built in Rake test task) prints the coverage results before the test results and gets the coverage wrong. It looks like it only sees the results of one test file, but I'm not sure.

I have a pretty simple (non-rails) setup, which I think is correct: https://github.com/hainesr/rubyzip/tree/next-gen

It seems to work as expected when using the Rake supplied test task, but I want the additional functionality of the Minitest version.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants