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

parallel_runtime_rspec.log incomplete #42

Closed
der-flo opened this Issue May 29, 2017 · 2 comments

Comments

Projects
None yet
2 participants
@der-flo
Copy link
Contributor

der-flo commented May 29, 2017

When running specs in parallel combined with zeus, the parallel_runtime_rspec.log is incomplete, some lines are missing.

So e. g. bundle exec parallel_rspec spec/models results in a complete file, zeus parallel_rspec spec/models in an incomplete one.

I'm using the most recent versions of the gems:

  • parallel_tests: 2.14.1
  • zeus-parallel_tests: 0.3.1
  • zeus: 0.15.13
@der-flo

This comment has been minimized.

Copy link
Contributor Author

der-flo commented Jun 27, 2017

I suspect the implementation of Zeus::ParallelTests::Rails#spawn_slave is wrong regarding the setting of ENV['TEST_ENV_NUMBER']:

ENV['TEST_ENV_NUMBER'] = test_env_number = (worker == '1' ? nil : worker)

The worker-1 case should return '' instead of nil, at least ParallelTests::RSpec::RuntimeLogger#start_dump expects this. The Readme also mentions this.

@sevos, @schneidmaster: Opinions?

@pboling

This comment has been minimized.

Copy link
Contributor

pboling commented Jun 28, 2017

I believe you are correct. When ENV['TEST_ENV_NUMBER'] is nil logic based on it assumes you are not running in parallel. The fix is simple, and would be important for anything that needs to know if the spec suite is running in parallel (like logging, or a VCR library cleaner).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.