toptal / crystalball

Regression Test Selection library for your RSpec test suite
https://toptal.github.io/crystalball/
MIT License
323 stars 41 forks source link

Getting an exception when there's an execution map without any example groups #105

Closed noralin closed 5 years ago

noralin commented 5 years ago

We're parallelizing our tests on CI and generating multiple execution maps.

Sometimes we don't actually run any tests on a specific worker, but an execution map is still generated without any example groups.

We are running into no implicit conversion of nil into Hash.

To reproduce this, in our execution maps folder, one of the yml file has just the metadata on top, but no example groups. For example, just having this in the file:

---
:type: Crystalball::ExecutionMap
:commit: <some SHA>
:timestamp: 1544572800
:version:
---

And then running CrystalBall.

Exception:

TypeError: no implicit conversion of nil into Hash
/vendor/cache/crystalball-bb6941984dbd/lib/crystalball/map_storage/yaml_storage.rb:24:in `merge!'
noralin commented 5 years ago

we have a pull request for a fix: https://github.com/toptal/crystalball/pull/104