Rspec process freezes in different places, the process cannot be killed. How to diagnose?

In the rails application that I am developing (on OS-X), I am increasingly running a test suite through rspec. This does not happen every time. I tried adding --format documentationat startup the package to see if this happens in one place every time, but it is not.

I tried to kill the process with kill -9. Then it changes the name to (ruby) with the state of the process ?E. This link assumes that the process is blocked while waiting for the system call to complete. I have to restart my machine every time this happens to kill this process.

I tried reinstalling rvm, ruby, mysql and imagemagick. This project uses the imagemagick (via mini_magick) gem, and I suspected that it might be one of these commands that causes the rspec lock. I tried adding instructions putsaround each of the mini_magick commands so that they complete the execution and everything looks fine.

I am looking for suggestions on how to diagnose this problem.

+5
source share
1 answer

Perhaps your problem is due to an order-dependent error, you can pass the seed, and the order will remain consistent. RSpec prints out the random number that it used to seed the randomizer. Use this number to run rspec in the same order --order rand:3455

0
source

All Articles