IT分からんわ~_~;

IT色々お勉強中のブログ

rspec高速化parallel_testsを試す

先ずはローカルで実行 dockerのコア数確認

cat /proc/cpuinfo | grep processor
processor   : 0
processor   : 1
processor   : 2
processor   : 3

コア数分database準備

bundle exec rake parallel:create[4]

table準備

bundle exec rake parallel:prepare

seedが必要だったのでdatabase分準備

bundle exec rake db:seed RAILS_ENV=test TEST_ENV_NUMBER=4
bundle exec rake parallel:spec

timeoutがたまに起こる、テストが悪いのか、pcの性能が足りないのか、、、、

     1.3) Failure/Error: @io.to_io.wait_readable(@read_timeout) or raise Net::ReadTimeout

          Net::ReadTimeout:
            Net::ReadTimeout

次はcircle ciで、、

patorash.hatenablog.com