skroutz / rspecq

Distribute and run RSpec suites among parallel workers; for faster CI builds
https://rubygems.org/gems/rspecq
MIT License
161 stars 24 forks source link

worker: files_to_example_ids fails if something is printed to stderr #34

Closed agis closed 4 years ago

agis commented 4 years ago

In 42d20e75a6 we started redirecting stderr to stdout, so that we display a helpful message in case the split command fails.

However, this introduced a bug. If the dry-run command prints something to stderr but still succeeds (e.g. a deprecation warning coming from some gem or some application initializer), files_to_example_ids fails because the output doesn't contain only JSON.

A failing test case that reproduces the issue can be found in branch gh34-testcase.

As 42d20e75a6 suggested, we should grab both streams separately instead of redirecting stderr to stdout.