In a rails application I'm developing (on OS-X), I'm finding running the test suite via rspec locking up increasingly frequently. It does not happen every time. I've tried adding --format documentation
when running the suite to see if it happens at the same place every time, and it does not.
在我正在开发的rails应用程序中(在OS-X上),我发现通过rspec越来越频繁地锁定运行测试套件。它不会每次都发生。我在运行套件时尝试添加--format文档,看看它是否每次都发生在同一个地方,但事实并非如此。
I've tried killing the process with kill -9
. It then changes the name to (ruby) with a process status of ?E
. This link suggests that the process is blocked waiting for a system call to finish. I have to restart my machine every time this happens in order to kill this process.
我试过用kill -9杀死进程。然后它将名称更改为(ruby),进程状态为?E。此链接表明该进程被阻止等待系统调用完成。每次发生这种情况我都必须重启我的机器才能杀死这个过程。
I've tried re-installing rvm, ruby, mysql, and imagemagick. This project is using imagemagick (via the mini_magick) gem, and I suspected that it may be one of these commands that is causing rspec to block. I tried adding puts
statements around each of the mini_magick commands to ensure they finish executing, and all looks fine.
我已经尝试重新安装rvm,ruby,mysql和imagemagick。这个项目正在使用imagemagick(通过mini_magick)gem,我怀疑它可能是导致rspec阻塞的这些命令之一。我尝试在每个mini_magick命令周围添加puts语句以确保它们完成执行,并且所有看起来都很好。
I'm looking for suggestions on how to diagnose this issue.
我正在寻找有关如何诊断此问题的建议。
1 个解决方案
#1
0
It's possible your problem is an order-dependency bug, you can pass the seed along and the order will remain consistent. RSpec prints out the random number it used to seed the randomizer. Use this number to run rspec with the same order --order rand:3455
您的问题可能是订单依赖性错误,您可以传递种子并且订单将保持一致。 RSpec打印出用于播种随机数的随机数。使用此数字以相同的顺序运行rspec - order rand:3455
#1
0
It's possible your problem is an order-dependency bug, you can pass the seed along and the order will remain consistent. RSpec prints out the random number it used to seed the randomizer. Use this number to run rspec with the same order --order rand:3455
您的问题可能是订单依赖性错误,您可以传递种子并且订单将保持一致。 RSpec打印出用于播种随机数的随机数。使用此数字以相同的顺序运行rspec - order rand:3455