Git Product home page Git Product logo

parallel_tests's People

Contributors

aaronjensen avatar aberant avatar amatsuda avatar berlin-ab avatar bootstraponline avatar bquorning avatar calaway avatar deivid-rodriguez avatar dogild avatar e2 avatar enkessler avatar grosser avatar hone avatar hron avatar iainbeeston avatar indrekj avatar jawwad avatar jdufresne avatar joakimk avatar jshraibman-mdsol avatar ndbroadbent avatar nicolasleger avatar nolanpro avatar rsutphin avatar sandeep-mm avatar silas avatar smasrypd avatar tk8817 avatar ujh avatar zekefast avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

parallel_tests's Issues

no such file to load -- spec/autorun

Hi,

I'm trying to run parallel_tests with rspec but got the following issue :

$ rake parallel:create
=> Created my 8 DBs
$ rake parallel:prepare
=> Everything well prepared
$ rake parallel:spec
=> /Users/MYUSERNAME/.rvm/gems/ruby-1.8.7-p334@MYGEMSET/gems/activesupport-3.0.7/lib/active_support/dependencies.rb:239:in `require': no such file to load -- spec/autorun (LoadError)
    from /Users/MYUSERNAME/.rvm/gems/ruby-1.8.7-p334@MYGEMSET/gems/activesupport-3.0.7/lib/active_support/dependencies.rb:239:in `require'
    from /Users/MYUSERNAME/.rvm/gems/ruby-1.8.7-p334@MYGEMSET/gems/activesupport-3.0.7/lib/active_support/dependencies.rb:227:in `load_dependency'
    from /Users/MYUSERNAME/.rvm/gems/ruby-1.8.7-p334@MYGEMSET/gems/activesupport-3.0.7/lib/active_support/dependencies.rb:239:in `require'
    from script/spec:9

Any idea how could I solve this issue ?

Thanks for this great project, can't wait to get it running smoothly.

formatters/progress_formatter.rb:25:in `write': Broken pipe - <STDOUT> (Errno::EPIPE)

After running rake parallel:prepare I received the following output:

/home/brian/.rvm/gems/ruby-1.9.2-p290@lfm/gems/rspec-core-2.6.4/lib/rspec/core/formatters/progress_formatter.rb:25:in write': Broken pipe - <STDOUT> (Errno::EPIPE) from /home/brian/.rvm/gems/ruby-1.9.2-p290@lfm/gems/rspec-core-2.6.4/lib/rspec/core/formatters/progress_formatter.rb:25:inputs'
from /home/brian/.rvm/gems/ruby-1.9.2-p290@lfm/gems/rspec-core-2.6.4/lib/rspec/core/formatters/progress_formatter.rb:25:in start_dump' from /home/brian/.rvm/gems/ruby-1.9.2-p290@lfm/gems/rspec-core-2.6.4/lib/rspec/core/reporter.rb:75:inblock in notify'
from /home/brian/.rvm/gems/ruby-1.9.2-p290@lfm/gems/rspec-core-2.6.4/lib/rspec/core/reporter.rb:74:in each' from /home/brian/.rvm/gems/ruby-1.9.2-p290@lfm/gems/rspec-core-2.6.4/lib/rspec/core/reporter.rb:74:innotify'
from /home/brian/.rvm/gems/ruby-1.9.2-p290@lfm/gems/rspec-core-2.6.4/lib/rspec/core/reporter.rb:21:in finish' from /home/brian/.rvm/gems/ruby-1.9.2-p290@lfm/gems/rspec-core-2.6.4/lib/rspec/core/reporter.rb:14:inreport'
from /home/brian/.rvm/gems/ruby-1.9.2-p290@lfm/gems/rspec-core-2.6.4/lib/rspec/core/command_line.rb:21:in run' from /home/brian/.rvm/gems/ruby-1.9.2-p290@lfm/gems/rspec-core-2.6.4/lib/rspec/core/runner.rb:80:inrun_in_process'
from /home/brian/.rvm/gems/ruby-1.9.2-p290@lfm/gems/rspec-core-2.6.4/lib/rspec/core/runner.rb:69:in run' from /home/brian/.rvm/gems/ruby-1.9.2-p290@lfm/gems/rspec-core-2.6.4/lib/rspec/core/runner.rb:11:inblock in autorun'

Gemfile.lock

GIT
remote: git://github.com/bbuchalter/ransack.git
revision: 64c035a73f222b1333b9b1c3dffddb54a76da079
specs:
ransack (0.5.4)
actionpack (> 3.0)
activerecord (
> 3.0)
activesupport (~> 3.0)

GIT
remote: git://github.com/bbuchalter/will_paginate.git
revision: e1676b5cec9e50e208fc2806b8c78ed1c8824275
specs:
will_paginate (2.3.15)

GIT
remote: git://github.com/colszowka/simplecov.git
revision: 3b050c1c70cf2ffb31d25fd31493071e9fc4d122
specs:
simplecov (0.5.0)
simplecov-html (~> 0.4.4)

GEM
remote: http://rubygems.org/
specs:
actionmailer (3.1.0.rc6)
actionpack (= 3.1.0.rc6)
mail (> 2.3.0)
actionpack (3.1.0.rc6)
activemodel (= 3.1.0.rc6)
activesupport (= 3.1.0.rc6)
builder (
> 3.0.0)
erubis (> 2.7.0)
i18n (
> 0.6)
rack (> 1.3.2)
rack-cache (
> 1.0.2)
rack-mount (> 0.8.1)
rack-test (
> 0.6.0)
sprockets (> 2.0.0.beta.12)
activemodel (3.1.0.rc6)
activesupport (= 3.1.0.rc6)
bcrypt-ruby (
> 2.1.4)
builder (> 3.0.0)
i18n (
> 0.6)
activerecord (3.1.0.rc6)
activemodel (= 3.1.0.rc6)
activesupport (= 3.1.0.rc6)
arel (> 2.2.1)
tzinfo (
> 0.3.29)
activeresource (3.1.0.rc6)
activemodel (= 3.1.0.rc6)
activesupport (= 3.1.0.rc6)
activesupport (3.1.0.rc6)
multi_json (> 1.0)
acts_as_list (0.1.4)
ansi (1.3.0)
arel (2.2.1)
awesome_print (0.4.0)
bcrypt-ruby (2.1.4)
builder (3.0.0)
capistrano (2.8.0)
highline
net-scp (>= 1.0.0)
net-sftp (>= 2.0.0)
net-ssh (>= 2.0.14)
net-ssh-gateway (>= 1.1.0)
capybara (1.0.1)
mime-types (>= 1.16)
nokogiri (>= 1.3.3)
rack (>= 1.0.0)
rack-test (>= 0.5.4)
selenium-webdriver (
> 2.0)
xpath (> 0.1.4)
capybara-webkit (0.6.0)
capybara (
> 1.0.0)
childprocess (0.2.1)
ffi (> 1.0.6)
coffee-script (2.2.0)
coffee-script-source
execjs
coffee-script-source (1.1.2)
colored (1.2)
database_cleaner (0.6.7)
diff-lcs (1.1.2)
erubis (2.7.0)
exception_notification (2.4.1)
execjs (1.2.4)
multi_json (
> 1.0)
factory_girl (2.0.4)
factory_girl_rails (1.1.0)
factory_girl (> 2.0.0)
railties (>= 3.0.0)
ffi (1.0.9)
haml (3.1.2)
highline (1.6.2)
hike (1.2.0)
hirb (0.5.0)
i18n (0.6.0)
jquery-rails (1.0.13)
railties (
> 3.0)
thor (> 0.14)
json (1.5.3)
json_pure (1.5.3)
libv8 (3.3.10.2)
mail (2.3.0)
i18n (>= 0.4.0)
mime-types (
> 1.16)
treetop (> 1.4.8)
mime-types (1.16)
multi_json (1.0.3)
mysql2 (0.3.7)
net-scp (1.0.4)
net-ssh (>= 1.99.1)
net-sftp (2.0.5)
net-ssh (>= 2.0.9)
net-ssh (2.1.4)
net-ssh-gateway (1.1.0)
net-ssh (>= 1.99.1)
nifty-generators (0.4.6)
nokogiri (1.5.0)
parallel (0.5.7)
parallel_tests (0.6.1)
parallel
polyglot (0.3.2)
rack (1.3.2)
rack-cache (1.0.2)
rack (>= 0.4)
rack-mount (0.8.2)
rack (>= 1.0.0)
rack-ssl (1.3.2)
rack
rack-test (0.6.1)
rack (>= 1.0)
rails (3.1.0.rc6)
actionmailer (= 3.1.0.rc6)
actionpack (= 3.1.0.rc6)
activerecord (= 3.1.0.rc6)
activeresource (= 3.1.0.rc6)
activesupport (= 3.1.0.rc6)
bundler (
> 1.0)
railties (= 3.1.0.rc6)
rails_best_practices (0.10.1)
activesupport
colored
erubis
haml
i18n
ruby-progressbar
ruby_parser
railties (3.1.0.rc6)
actionpack (= 3.1.0.rc6)
activesupport (= 3.1.0.rc6)
rack-ssl (> 1.3.2)
rake (>= 0.8.7)
rdoc (
> 3.4)
thor (> 0.14.6)
rake (0.9.2)
rdoc (3.9.2)
rspec (2.6.0)
rspec-core (
> 2.6.0)
rspec-expectations (> 2.6.0)
rspec-mocks (
> 2.6.0)
rspec-core (2.6.4)
rspec-expectations (2.6.0)
diff-lcs (> 1.1.2)
rspec-mocks (2.6.0)
rspec-rails (2.6.1)
actionpack (
> 3.0)
activesupport (> 3.0)
railties (
> 3.0)
rspec (> 2.6.0)
ruby-progressbar (0.0.10)
ruby_parser (2.1.0)
sexp_processor (
> 3.0)
rubyzip (0.9.4)
sass (3.1.7)
sass-rails (3.1.0.rc.6)
actionpack (> 3.1.0.rc6)
railties (
> 3.1.0.rc6)
sass (>= 3.1.4)
selenium-webdriver (2.4.0)
childprocess (>= 0.2.1)
ffi (>= 1.0.7)
json_pure
rubyzip
sexp_processor (3.0.6)
shoulda-matchers (1.0.0.beta3)
simplecov-html (0.4.5)
sprockets (2.0.0.beta.13)
hike (> 1.2)
rack (
> 1.0)
tilt (!= 1.3.0, > 1.1)
therubyracer (0.9.3)
libv8 (
> 3.3.10)
thor (0.14.6)
tilt (1.3.2)
treetop (1.4.10)
polyglot
polyglot (>= 0.3.1)
tzinfo (0.3.29)
uglifier (1.0.1)
execjs (>= 0.3.0)
multi_json (>= 1.0.2)
xpath (0.1.4)
nokogiri (~> 1.3)

PLATFORMS
ruby

DEPENDENCIES
acts_as_list
ansi
awesome_print
capistrano
capybara
capybara-webkit
coffee-script
database_cleaner
exception_notification
factory_girl_rails
hirb
jquery-rails
json
mysql2
nifty-generators
parallel_tests
rails (= 3.1.0.rc6)
rails_best_practices
ransack!
rspec-rails
sass-rails (~> 3.1.0.rc)
shoulda-matchers
simplecov!
therubyracer
uglifier
will_paginate!

It fails with rspec 2.0.1. Option --tty can't be parsed.

I just tried to use parallel_test with rspec 2.0.1. It failed with the following:

/home/diegoeche/.rvm/gems/ruby-1.9.2-p136/gems/rspec-core-2.0.1/lib/rspec/core/option_parser.rb:18:in parse!': invalid option: --tty (OptionParser::InvalidOption) from /home/diegoeche/.rvm/gems/ruby-1.9.2-p136/gems/rspec-core-2.0.1/lib/rspec/core/option_parser.rb:4:inparse!'
from /home/diegoeche/.rvm/gems/ruby-1.9.2-p136/gems/rspec-core-2.0.1/lib/rspec/core/configuration_options.rb:64:in

I noticed that https://github.com/grosser/parallel_tests/blob/master/lib/parallel_specs.rb contains:

def self.rspec_2_color
'--tty ' if $stdout.tty?
end

According to rspec/rspec-core#224 it seems the option used to be called --autotest.

How do I load all test files up?

I would like to do the following:

$ rake parallel:test[**/*_test.rb]

but it currently doesn't work. I have not read through your source yet, but thought I would ask for others mutual benefit.

Thanks.

parallel:prepare fails with mysql error

one of the processes fails executing the db:prepare task. so after the task one of the test-dbs misses one migration:

mysql> use qype_development;
Database changed
mysql> select count(*) from schema_migrations;
+----------+
| count(*) |
+----------+
|     1408 |
+----------+
1 row in set (0.01 sec)


mysql> use qype_test2;
Database changed
mysql> select count(*) from schema_migrations;
+----------+
| count(*) |
+----------+
|     1407 |
+----------+
1 row in set (0.00 sec)

do you have any pointers where to look after the issue?

peterschroder@phoet:~/Sites/main/qype○prallel_tests×$ rake parallel:prepare --trace
(in /Users/peterschroder/Sites/main/qype)
** Invoke parallel:prepare (first_time)
** Invoke db:abort_if_pending_migrations (first_time)
** Invoke environment (first_time)
** Execute environment
** Execute db:abort_if_pending_migrations
** Execute parallel:prepare
rake aborted!
Mysql::Error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'INSERT INTO schema_migrations (version) VALUES ('1')' at line 1: INSERT INTO schema_migrations (version) VALUES ('99');INSERT INTO schema_migrations (version) VALUES ('1');

(See full trace by running task with --trace)
(in /Users/peterschroder/Sites/main/qype)
(in /Users/peterschroder/Sites/main/qype)

Trying to setup with Mongoid and Rspec

Since I'm using Mongoid, I deleted the config/database.yaml and modified the config/mongoid.yml as following:
# config/mongoid.yml

 test:
   <<: *defaults
   database: pandahr_test<%= ENV['TEST_ENV_NUMBER'] %>

And I'm using spork as well. But I ran the spec without spork running.

Then I ran rake parallel:create. This went well. But don't know what happened internally.
Then I ran rake parallel:spec and it blows up:

2 processes for 72 specs, ~ 36 specs per process
No DRb server is running. Running in local process instead ...
/Users/millisami/.rvm/gems/ruby-1.9.2-p136/bundler/gems/rspec-core-011b1ce34016/lib/rspec/core/configuration.rb:386:in `load': no such file to load -- /Users/millisami/apps/pandahr/no (LoadError)
    from /Users/millisami/.rvm/gems/ruby-1.9.2-p136/bundler/gems/rspec-core-011b1ce34016/lib/rspec/core/configuration.rb:386:in `block in load_spec_files'
    from /Users/millisami/.rvm/gems/ruby-1.9.2-p136/bundler/gems/rspec-core-011b1ce34016/lib/rspec/core/configuration.rb:386:in `map'
    from /Users/millisami/.rvm/gems/ruby-1.9.2-p136/bundler/gems/rspec-core-011b1ce34016/lib/rspec/core/configuration.rb:386:in `load_spec_files'
    from /Users/millisami/.rvm/gems/ruby-1.9.2-p136/bundler/gems/rspec-core-011b1ce34016/lib/rspec/core/command_line.rb:18:in `run'
    from /Users/millisami/.rvm/gems/ruby-1.9.2-p136/bundler/gems/rspec-core-011b1ce34016/lib/rspec/core/runner.rb:55:in `run_in_process'
    from /Users/millisami/.rvm/gems/ruby-1.9.2-p136/bundler/gems/rspec-core-011b1ce34016/lib/rspec/core/runner.rb:44:in `run'
    from /Users/millisami/.rvm/gems/ruby-1.9.2-p136/bundler/gems/rspec-core-011b1ce34016/lib/rspec/core/runner.rb:10:in `block in autorun'
No DRb server is running. Running in local process instead ...
/Users/millisami/.rvm/gems/ruby-1.9.2-p136/bundler/gems/rspec-core-011b1ce34016/lib/rspec/core/configuration.rb:386:in `load': no such file to load -- /Users/millisami/apps/pandahr/no (LoadError)
    from /Users/millisami/.rvm/gems/ruby-1.9.2-p136/bundler/gems/rspec-core-011b1ce34016/lib/rspec/core/configuration.rb:386:in `block in load_spec_files'
    from /Users/millisami/.rvm/gems/ruby-1.9.2-p136/bundler/gems/rspec-core-011b1ce34016/lib/rspec/core/configuration.rb:386:in `map'
    from /Users/millisami/.rvm/gems/ruby-1.9.2-p136/bundler/gems/rspec-core-011b1ce34016/lib/rspec/core/configuration.rb:386:in `load_spec_files'
    from /Users/millisami/.rvm/gems/ruby-1.9.2-p136/bundler/gems/rspec-core-011b1ce34016/lib/rspec/core/command_line.rb:18:in `run'
    from /Users/millisami/.rvm/gems/ruby-1.9.2-p136/bundler/gems/rspec-core-011b1ce34016/lib/rspec/core/runner.rb:55:in `run_in_process'
    from /Users/millisami/.rvm/gems/ruby-1.9.2-p136/bundler/gems/rspec-core-011b1ce34016/lib/rspec/core/runner.rb:44:in `run'
    from /Users/millisami/.rvm/gems/ruby-1.9.2-p136/bundler/gems/rspec-core-011b1ce34016/lib/rspec/core/runner.rb:10:in `block in autorun'

Results:

Took 27.630303 seconds
Specs Failed

Color Output disappears with Rspec2.

I recently upgraded my project to Rails 3/RSpec 2 and lost all color output when running rake parallel:spec.

I have --color in both .rspec and in spec/parallel_spec.opts.

Changing formats in the parallel_spec.opts works, and I get full color when running rake spec.

I am running Ubuntu and Ruby 1.8.7.

I am hoping this is something obvious because I am having a hell of a time deciding if slow tests or black & white tests are worse.

Doesn't work after upgrading from Snow Leopard to Lion

On OSX, after upgrading to Lion (including the required XCode upgrade), parallel_tests now fails as follows:

craig@dorcas ~/development/cav/list $ bundle exec rake parallel:spec
(in /Users/craig/development/cav/list)
/Users/craig/development/cav/list/vendor/plugins/parallel_specs/tasks/parallel_specs.rake:21: command not found: hwprefs cpu_count
rake aborted!
divided by 0

I've tried re-installing the gem.

I can't find a hwprefs command on my system. I'm not sure yet if this can be re-installed somehow. Not via homebrew it seems.

Perhaps not a parallel_tests issue, or perhaps under Lion, parallel_tests should be using a different command.

Tests never finalize

After correctly setting up my current project for parallel_specs (Test::Unit), and running all tests are finished running (2 cores), the script never ends and it just sits idle until I manually kill it.

Finished in 252.922368 seconds.
1059 tests, 1862 assertions, 0 failures, 0 errors
......
Finished in 332.40318 seconds.
1715 tests, 2063 assertions, 0 failures, 0 errors

It just sits there...

Cannot run cucumber features parallel on Mac OSX - Steps cannot be read

I have installed parallel_tests gem and set the port increment for Capybara and database surfix increment. That's being said I'll run one process on port 4000 with database xxx_test_0 & one process port 4002 with database xxx_test_2.

When I run 'rake parallel:features', only one process can load steps and run features. The other process report all steps as being undefined.

removing version warning

Not sure if others are seeing this, but I get this popping up when running my specs:

....rvm/gems/ree-1.8.7-2010.02/gems/parallel_tests-0.4.9/lib/parallel_tests.rb:6: warning: already initialized constant VERSION

would be easy enough to avoid with an unless defined....unless this is an indication things aren't being loaded/required properly. Any thoughts?

spec_summary_logger.rb:20:in `example_failed': wrong number of arguments (1 for 3) (ArgumentError)

Backtrace:

home/brian/.rvm/gems/ruby-1.9.2-p290@lfm/gems/parallel_tests-0.6.1/lib/parallel_specs/spec_summary_logger.rb:20:in `example_failed': wrong number of arguments (1 for 3) (ArgumentError)
    from /home/brian/.rvm/gems/ruby-1.9.2-p290@lfm/gems/rspec-core-2.6.4/lib/rspec/core/reporter.rb:75:in `block in notify'
    from /home/brian/.rvm/gems/ruby-1.9.2-p290@lfm/gems/rspec-core-2.6.4/lib/rspec/core/reporter.rb:74:in `each'
    from /home/brian/.rvm/gems/ruby-1.9.2-p290@lfm/gems/rspec-core-2.6.4/lib/rspec/core/reporter.rb:74:in `notify'
    from /home/brian/.rvm/gems/ruby-1.9.2-p290@lfm/gems/rspec-core-2.6.4/lib/rspec/core/reporter.rb:60:in `example_failed'
    from /home/brian/.rvm/gems/ruby-1.9.2-p290@lfm/gems/rspec-core-2.6.4/lib/rspec/core/example.rb:121:in `finish'
    from /home/brian/.rvm/gems/ruby-1.9.2-p290@lfm/gems/rspec-core-2.6.4/lib/rspec/core/example.rb:83:in `fail_fast'
    from /home/brian/.rvm/gems/ruby-1.9.2-p290@lfm/gems/rspec-core-2.6.4/lib/rspec/core/example_group.rb:275:in `block in fail_filtered_examples'
    from /home/brian/.rvm/gems/ruby-1.9.2-p290@lfm/gems/rspec-core-2.6.4/lib/rspec/core/example_group.rb:275:in `each'
    from /home/brian/.rvm/gems/ruby-1.9.2-p290@lfm/gems/rspec-core-2.6.4/lib/rspec/core/example_group.rb:275:in `fail_filtered_examples'
    from /home/brian/.rvm/gems/ruby-1.9.2-p290@lfm/gems/rspec-core-2.6.4/lib/rspec/core/example_group.rb:279:in `block in fail_filtered_examples'
    from /home/brian/.rvm/gems/ruby-1.9.2-p290@lfm/gems/rspec-core-2.6.4/lib/rspec/core/example_group.rb:277:in `each'
    from /home/brian/.rvm/gems/ruby-1.9.2-p290@lfm/gems/rspec-core-2.6.4/lib/rspec/core/example_group.rb:277:in `fail_filtered_examples'
    from /home/brian/.rvm/gems/ruby-1.9.2-p290@lfm/gems/rspec-core-2.6.4/lib/rspec/core/example_group.rb:266:in `rescue in run'
    from /home/brian/.rvm/gems/ruby-1.9.2-p290@lfm/gems/rspec-core-2.6.4/lib/rspec/core/example_group.rb:271:in `run'
    from /home/brian/.rvm/gems/ruby-1.9.2-p290@lfm/gems/rspec-core-2.6.4/lib/rspec/core/command_line.rb:24:in `block (2 levels) in run'
    from /home/brian/.rvm/gems/ruby-1.9.2-p290@lfm/gems/rspec-core-2.6.4/lib/rspec/core/command_line.rb:24:in `map'
    from /home/brian/.rvm/gems/ruby-1.9.2-p290@lfm/gems/rspec-core-2.6.4/lib/rspec/core/command_line.rb:24:in `block in run'
    from /home/brian/.rvm/gems/ruby-1.9.2-p290@lfm/gems/rspec-core-2.6.4/lib/rspec/core/reporter.rb:12:in `report'
    from /home/brian/.rvm/gems/ruby-1.9.2-p290@lfm/gems/rspec-core-2.6.4/lib/rspec/core/command_line.rb:21:in `run'
    from /home/brian/.rvm/gems/ruby-1.9.2-p290@lfm/gems/rspec-core-2.6.4/lib/rspec/core/runner.rb:80:in `run_in_process'
    from /home/brian/.rvm/gems/ruby-1.9.2-p290@lfm/gems/rspec-core-2.6.4/lib/rspec/core/runner.rb:69:in `run'
    from /home/brian/.rvm/gems/ruby-1.9.2-p290@lfm/gems/rspec-core-2.6.4/lib/rspec/core/runner.rb:11:in `block in autorun'

Gemfile.lock

GIT
remote: git://github.com/bbuchalter/ransack.git
revision: 64c035a73f222b1333b9b1c3dffddb54a76da079
specs:
ransack (0.5.4)
actionpack (> 3.0)
activerecord (
> 3.0)
activesupport (~> 3.0)

GIT
remote: git://github.com/bbuchalter/will_paginate.git
revision: e1676b5cec9e50e208fc2806b8c78ed1c8824275
specs:
will_paginate (2.3.15)

GIT
remote: git://github.com/colszowka/simplecov.git
revision: 3b050c1c70cf2ffb31d25fd31493071e9fc4d122
specs:
simplecov (0.5.0)
simplecov-html (~> 0.4.4)

GIT
remote: git://github.com/jnicklas/capybara.git
revision: ec2ff4622058f57ce000f4aa72c16a105ef084ef
specs:
capybara (1.0.0)
mime-types (>= 1.16)
nokogiri (>= 1.3.3)
rack (>= 1.0.0)
rack-test (>= 0.5.4)
selenium-webdriver (> 2.0)
xpath (
> 0.1.4)

GIT
remote: git://github.com/rails/rails.git
revision: cb1f31518fe1bf39fb7c19b26302d13eb360ef2d
tag: v3.1.0.rc6
specs:
actionmailer (3.1.0.rc6)
actionpack (= 3.1.0.rc6)
mail (> 2.3.0)
actionpack (3.1.0.rc6)
activemodel (= 3.1.0.rc6)
activesupport (= 3.1.0.rc6)
builder (
> 3.0.0)
erubis (> 2.7.0)
i18n (
> 0.6)
rack (> 1.3.2)
rack-cache (
> 1.0.2)
rack-mount (> 0.8.1)
rack-test (
> 0.6.0)
sprockets (> 2.0.0.beta.12)
activemodel (3.1.0.rc6)
activesupport (= 3.1.0.rc6)
bcrypt-ruby (
> 2.1.4)
builder (> 3.0.0)
i18n (
> 0.6)
activerecord (3.1.0.rc6)
activemodel (= 3.1.0.rc6)
activesupport (= 3.1.0.rc6)
arel (> 2.2.1)
tzinfo (
> 0.3.29)
activeresource (3.1.0.rc6)
activemodel (= 3.1.0.rc6)
activesupport (= 3.1.0.rc6)
activesupport (3.1.0.rc6)
multi_json (> 1.0)
rails (3.1.0.rc6)
actionmailer (= 3.1.0.rc6)
actionpack (= 3.1.0.rc6)
activerecord (= 3.1.0.rc6)
activeresource (= 3.1.0.rc6)
activesupport (= 3.1.0.rc6)
bundler (
> 1.0)
railties (= 3.1.0.rc6)
railties (3.1.0.rc6)
actionpack (= 3.1.0.rc6)
activesupport (= 3.1.0.rc6)
rack-ssl (> 1.3.2)
rake (>= 0.8.7)
rdoc (
> 3.4)
thor (~> 0.14.6)

GIT
remote: git://github.com/thoughtbot/shoulda.git
revision: 928311d88233fa06ba5c185dcb5ceb564cf8d3da
specs:
shoulda (3.0.0.beta2)
shoulda-context (> 1.0.0.beta1)
shoulda-matchers (
> 1.0.0.beta1)

GEM
remote: http://rubygems.org/
specs:
active_reload (0.3.0)
acts_as_list (0.1.4)
addressable (2.2.6)
ansi (1.3.0)
archive-tar-minitar (0.5.2)
arel (2.2.1)
awesome_print (0.4.0)
bcrypt-ruby (2.1.4)
builder (3.0.0)
capistrano (2.8.0)
highline
net-scp (>= 1.0.0)
net-sftp (>= 2.0.0)
net-ssh (>= 2.0.14)
net-ssh-gateway (>= 1.1.0)
capybara-webkit (0.6.0)
capybara (> 1.0.0)
childprocess (0.2.1)
ffi (
> 1.0.6)
coffee-script (2.2.0)
coffee-script-source
execjs
coffee-script-source (1.1.2)
colored (1.2)
columnize (0.3.4)
database_cleaner (0.6.7)
diff-lcs (1.1.2)
erubis (2.7.0)
exception_notification (2.4.1)
execjs (1.2.4)
multi_json (> 1.0)
factory_girl (2.0.4)
factory_girl_rails (1.1.0)
factory_girl (
> 2.0.0)
railties (>= 3.0.0)
ffi (1.0.9)
guard (0.6.2)
thor (> 0.14.6)
guard-rspec (0.4.2)
guard (>= 0.4.0)
guard-test (0.3.0)
guard (>= 0.2.2)
test-unit (
> 2.2)
haml (3.1.2)
highline (1.6.2)
hike (1.2.0)
hirb (0.5.0)
i18n (0.6.0)
jquery-rails (1.0.13)
railties (> 3.0)
thor (
> 0.14)
json (1.5.3)
json_pure (1.5.3)
launchy (2.0.5)
addressable (> 2.2.6)
libnotify (0.5.7)
libv8 (3.3.10.2)
linecache19 (0.5.12)
ruby_core_source (>= 0.1.4)
mail (2.3.0)
i18n (>= 0.4.0)
mime-types (
> 1.16)
treetop (> 1.4.8)
mime-types (1.16)
multi_json (1.0.3)
mysql2 (0.3.6)
net-scp (1.0.4)
net-ssh (>= 1.99.1)
net-sftp (2.0.5)
net-ssh (>= 2.0.9)
net-ssh (2.1.4)
net-ssh-gateway (1.1.0)
net-ssh (>= 1.99.1)
nifty-generators (0.4.6)
nokogiri (1.5.0)
parallel (0.5.7)
parallel_tests (0.6.1)
parallel
polyglot (0.3.2)
rack (1.3.2)
rack-cache (1.0.2)
rack (>= 0.4)
rack-mount (0.8.2)
rack (>= 1.0.0)
rack-ssl (1.3.2)
rack
rack-test (0.6.1)
rack (>= 1.0)
rails_best_practices (0.10.1)
activesupport
colored
erubis
haml
i18n
ruby-progressbar
ruby_parser
rake (0.8.7)
rb-inotify (0.8.6)
ffi (>= 0.5.0)
rdoc (3.9.2)
rspec (2.6.0)
rspec-core (
> 2.6.0)
rspec-expectations (> 2.6.0)
rspec-mocks (
> 2.6.0)
rspec-core (2.6.4)
rspec-expectations (2.6.0)
diff-lcs (> 1.1.2)
rspec-mocks (2.6.0)
rspec-rails (2.6.1)
actionpack (
> 3.0)
activesupport (> 3.0)
railties (
> 3.0)
rspec (> 2.6.0)
ruby-debug-base19 (0.11.25)
columnize (>= 0.3.1)
linecache19 (>= 0.5.11)
ruby_core_source (>= 0.1.4)
ruby-debug19 (0.11.6)
columnize (>= 0.3.1)
linecache19 (>= 0.5.11)
ruby-debug-base19 (>= 0.11.19)
ruby-prof (0.10.8)
ruby-progressbar (0.0.10)
ruby_core_source (0.1.5)
archive-tar-minitar (>= 0.5.2)
ruby_parser (2.1.0)
sexp_processor (
> 3.0)
rubyzip (0.9.4)
sass (3.1.7)
sass-rails (3.1.0.rc.6)
actionpack (> 3.1.0.rc6)
railties (
> 3.1.0.rc6)
sass (>= 3.1.4)
selenium-webdriver (2.4.0)
childprocess (>= 0.2.1)
ffi (>= 1.0.7)
json_pure
rubyzip
sexp_processor (3.0.6)
shoulda-context (1.0.0.beta1)
shoulda-matchers (1.0.0.beta3)
simplecov-html (0.4.5)
sprockets (2.0.0.beta.13)
hike (> 1.2)
rack (
> 1.0)
tilt (!= 1.3.0, > 1.1)
test-unit (2.3.2)
therubyracer (0.9.3)
libv8 (
> 3.3.10)
thor (0.14.6)
tilt (1.3.2)
treetop (1.4.10)
polyglot
polyglot (>= 0.3.1)
tzinfo (0.3.29)
uglifier (1.0.1)
execjs (>= 0.3.0)
multi_json (>= 1.0.2)
xpath (0.1.4)
nokogiri (~> 1.3)

PLATFORMS
ruby

DEPENDENCIES
active_reload
acts_as_list
ansi
awesome_print
bcrypt-ruby
capistrano
capybara!
capybara-webkit
coffee-script
database_cleaner
exception_notification
execjs
factory_girl_rails
guard
guard-rspec
guard-test
hirb
jquery-rails
json
launchy
libnotify
mysql2 (= 0.3.6)
nifty-generators
parallel_tests
rails!
rails_best_practices
rake (= 0.8.7)
ransack!
rb-inotify
rspec-rails
ruby-debug19
ruby-prof
sass
sass-rails
shoulda!
simplecov!
sprockets
test-unit
therubyracer
uglifier
will_paginate!

Allow for a per user default parallel count

When integrating this project into our application, I found that more than 2 workers had diminishing returns. On my MBP, the processor count is 8, so I have to create a bunch of rake tasks to wrap the standard tasks to reduce their counts.

Would there be any interest in a way to let users override the default processor count behavior? Perhaps an environment variable?

Add support for TESTOPTS

Currently, there doesn't seem to be any support for getting verbose output from the test runner. This is typically accomplished using

rake test TESTOPTS="-v"

or

ruby test/unit/my_unit_test.rb -v

Unfortunately, there is not option pipeline for getting a -v through. I was able to hack it in with the following change https://gist.github.com/a766d54b9380bb08df2c Can another option be added to enable passing options to the script (as opposed to -o which sends them to the interpreter)?

-f option seems not to work anymore?

-f, --files [FILES] run these test files (comma-separated list w/o spaces)

This doesn't work anymore - it seems to have been removed from /bin/parallel_test

any ideas why?

What I would really like to do is to run controller and model tests (inside /spec/model and /spec/controller but NOT /spec/acceptance/*_spec

Is there an easy way to do this?

Steve

does not work with ruby 1.9.3 rc1

rake parallel:test[^unit]
...
/home/saks/.rvm/rubies/ruby-1.9.3-tv1_9_3_rc1/lib/ruby/1.9.1/test/unit.rb:167:in `block in non_options': file not found: - (ArgumentError)
    from /home/saks/.rvm/rubies/ruby-1.9.3-tv1_9_3_rc1/lib/ruby/1.9.1/test/unit.rb:146:in `map!'
    from /home/saks/.rvm/rubies/ruby-1.9.3-tv1_9_3_rc1/lib/ruby/1.9.1/test/unit.rb:146:in `non_options'
    from /home/saks/.rvm/rubies/ruby-1.9.3-tv1_9_3_rc1/lib/ruby/1.9.1/test/unit.rb:207:in `non_options'
    from /home/saks/.rvm/rubies/ruby-1.9.3-tv1_9_3_rc1/lib/ruby/1.9.1/test/unit.rb:52:in `process_args'
    from /home/saks/.rvm/rubies/ruby-1.9.3-tv1_9_3_rc1/lib/ruby/1.9.1/minitest/unit.rb:891:in `_run'
    from /home/saks/.rvm/rubies/ruby-1.9.3-tv1_9_3_rc1/lib/ruby/1.9.1/minitest/unit.rb:884:in `run'
    from /home/saks/.rvm/rubies/ruby-1.9.3-tv1_9_3_rc1/lib/ruby/1.9.1/test/unit.rb:21:in `run'
    from /home/saks/.rvm/rubies/ruby-1.9.3-tv1_9_3_rc1/lib/ruby/1.9.1/test/unit.rb:326:in `block (2 levels) in autorun'
    from /home/saks/.rvm/rubies/ruby-1.9.3-tv1_9_3_rc1/lib/ruby/1.9.1/test/unit.rb:27:in `run_once'
    from /home/saks/.rvm/rubies/ruby-1.9.3-tv1_9_3_rc1/lib/ruby/1.9.1/test/unit.rb:325:in `block in autorun'

but it does work well with ruby 1.9.2p290

i have installed ruby 1.9.3 rc1 just like this

rake parallel:features runs in the test RAILS_ENV

Recent versions of cucumber expect their own RAILS_ENV (cucumber), but running rake parallel:features overrides the RAILS_ENV to be test, which will break some test suites. Is there any reason parallel_tests can't just leave the environment blank and let test/spec/cucumber figure it out?

"invalid option" error after adding spec/parallel_spec.opts

/usr/lib/ruby/gems/1.9.1/gems/rspec-core-2.0.1/lib/rspec/core/option_parser.rb:18:in `parse!': invalid option: -O (OptionParser::InvalidOption)
from /usr/lib/ruby/gems/1.9.1/gems/rspec-core-2.0.1/lib/rspec/core/option_parser.rb:4:in `parse!'
from /usr/lib/ruby/gems/1.9.1/gems/rspec-core-2.0.1/lib/rspec/core/configuration_options.rb:64:in `parse_command_line_options'
from /usr/lib/ruby/gems/1.9.1/gems/rspec-core-2.0.1/lib/rspec/core/configuration_options.rb:46:in `parse_options'
from /usr/lib/ruby/gems/1.9.1/gems/rspec-core-2.0.1/lib/rspec/core/runner.rb:41:in `run'
from /usr/lib/ruby/gems/1.9.1/gems/rspec-core-2.0.1/lib/rspec/core/runner.rb:10:in `block in autor

But if I remove spec/parallel_spec.opts it is ok.

Some tests failing that otherwise don't

If I run rake spec I get no failed tests at all.

However after running rake parallel:spec a few times a few tests fail, notably the errors are all from validates_uniqueness_of.

If I then run rake spec again, and then rake parallel:spec immediately afterwards, all my test pass. Not sure if the database is being cleared out properly or something like that.

A little more digging seems that records are being deleted in the wrong order, this is a fairly large app, and the previous developer has put foreign keys on some of the tables.

fork after initialization?

I'm using ree, and starting parallel_tests with 6 runners slays my system as each tries to load 100MB of junk at the same time.

Any way to preload then fork? It seems obvious, so I'm assuming there's a reason it's difficult but thought I'd mention it :)

I guess it becomes a daemon system, as you'd need to launch it as a "server" then fork things. Perhaps it'd be possible to "fake" it as a unicorn "app", then pass tests into the runners like that.

Spec output is useless

When I run rake parallel:spec[6] and it fails, the output is just:

Results:

Took 504.352352 seconds
Specs Failed

That's not so useful. Is there any way to pipe the output to progressbar? Or at least some way to make it output which tests failed?

'marshal data too short' during `rake parallel:prepare`

While running rake parallel:prepare I am receiving 'marshal data too short'.
$ rake db:test:prepare #=> works
$ TEST_ENV_NUMBER=2 rake db:test:prepare #=> Works
$ rake parallel:prepare #=> marshal data too short
$ rake parallel:prepare[1] #=> marshal data too short

Looks like "line 28: read_from_pipes(pipes)" is returning an empty string.

Sys info:

  • plugin VERSION=0.3.1
  • parallel (0.4.0)
  • ruby 1.8.7-p248 AND ree-1.8.7-2010.01
    • Ubuntu Koala
    • Linux 2.6.31-20-generic #57-Ubuntu SMP Mon Feb 8 09:05:19 UTC 2010 i686 GNU/Linux
    • DB: sqlite3 OR mysql Server version: 5.1.37-1ubuntu5.1 (Ubuntu)

Backtrace:
** Execute db:schema:load
DBG: x:'' #from in_processes
DBG: deserializing: ''
** Execute db:schema:load
rake aborted!
marshal data too short
/home/matt/.rvm/gems/ruby-1.8.7-p248/gems/parallel-0.4.0/lib/parallel.rb:116:in load' /home/matt/.rvm/gems/ruby-1.8.7-p248/gems/parallel-0.4.0/lib/parallel.rb:116:indeserialize'
/home/matt/.rvm/gems/ruby-1.8.7-p248/gems/parallel-0.4.0/lib/parallel.rb:29:in in_processes' /home/matt/.rvm/gems/ruby-1.8.7-p248/gems/parallel-0.4.0/lib/parallel.rb:29:inmap'
/home/matt/.rvm/gems/ruby-1.8.7-p248/gems/parallel-0.4.0/lib/parallel.rb:29:in `in_processes' /home/matt/develop/clients/wearetitans/ygs/vendor/plugins/parallel_tests/tasks/parallel_tests.rake:6

Any ideas?

Thanks, Matt

parallel:prepare creates corrupt schema dumps with lots of cores

I've got an eight-core machine that is consistently producing corrupt db/development_structure.sql files. My coworkers on two-core machines are not experiencing this problem.

Digging in the code it seems that db:test:prepare is called in parallel, which is causing multiple processes to write to the schema dump.

A possible solution would be to create the schema dump using only a single process and then load it in parallel.

Processes seem to run sequentially for specs, but in parallel for features

I've followed the installation and setup procedure to the letter. The parallel:create task successfully detects 4 cores, and builds 4 test databases. parallel:prepare runs without a hitch. I see a dramatic improvement in the runtime of my cucumber features, and my system monitor shows all 4 cores chewing away at the tests. However, when I run the specs with "rake parallel:spec", or "parallel_spec" the tests consistently run in slightly more time than it takes to run them sequentially (ie. "rake spec"). Additionally, the system monitor shows all 4 cores fire up during the initialization of the specs, but only 1 core is active while the tests are actually running. Although 4 processes are created, according to the output "4 processes for 41 specs, ~ 10 specs per process", it appears as if these processes are then run sequentially, rather than in parallel. I see the rspec summary output for the first process before the second process begins. I haven't been able to find other posts about this issue, which makes me suspect that I've somehow messed up the configuration, but I have not been able to find the problem. Any thoughts?
Thank you.

Feature Request: Even process runtimes for Cucumber features

This would be much appreciated. As much as we try to keep feature files small, some of them aren't broken up yet, or are smaller but run long because they're @javascript selenium tests. It would be awesome if rake parallel:features would learn the runtimes of each file and do the balancing act.

Rails 3 support

Don't know if parallel works on Rails 3, but it would be nice to clarify the current state on the README file.

Can't run tasks

Rake 0.9.2, Rails 3.0.9, installed parallel_tests 0.5.0, rake -T isn't showing any of the tasks, cannot run :

bundle exec rake parallel:create

rake aborted!
Don't know how to build task 'parallel:create'

WARNING: Could not determine processor information.

On a Mac Pro, I get these warnings when running parallel spec.

WARNING: Could not determine processor information.
WARNING: Could not determine memory controller information.
WARNING: Could not determine Operating System information.

It goes on to work normally and sets up the correct amount of processes and such. Not sure where to start with getting rid of these.

Problem using Cucumber and Selenium: Address already in use

Hi,

I am trying to launch my Cucumber features using parallel_tests:

rake parallel:features

I am using 2 processes. While one process runs ok, the other one keeps launching an exception:

/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/net/http.rb:560:in 'initialize': Connection refused - connect(2) (Errno::ECONNREFUSED)

I am using cucumber+capybara and the Webdriver (selenium 2) driver for Firefox.

Any tip on this one? Is it possible to have two firefox instances at the same time? Or Cucumber support is only limited to headless configurations?

Thanks in advance

grouper.rb, in_even_groups_by_size: undefined method `[]' for nil:NilClass

Hello,

fresh Rails install (3.1.1 and 3.0.4 for legacy apps). Run 'rake parallel:spec' inside an app. This is the error:

/Library/Ruby/Gems/1.8/gems/parallel_tests-0.4.12/lib/parallel_tests.rb:6: warning: already initialized constant VERSION
/Library/Ruby/Gems/1.8/gems/parallel_tests-0.4.12/lib/parallel_tests/grouper.rb:20:in `in_even_groups_by_size': 
  undefined method `[]' for nil:NilClass (NoMethodError)
from /Library/Ruby/Gems/1.8/gems/parallel_tests-0.4.12/lib/parallel_tests/grouper.rb:17:in `each'
from /Library/Ruby/Gems/1.8/gems/parallel_tests-0.4.12/lib/parallel_tests/grouper.rb:17:in `in_even_groups_by_size'
from /Library/Ruby/Gems/1.8/gems/parallel_tests-0.4.12/lib/parallel_tests.rb:27:in `tests_in_groups'
from /Library/Ruby/Gems/1.8/gems/parallel_tests-0.4.12/lib/tasks/../parallel_tests/../../bin/parallel_test:65

This is on OS X Lion 10.7.2 and on a Macbook Pro.

Any ideas what might cause this?

Thank you!

failures due to config.action_controller.perform_caching set to true & :mem_cache_store

Hi Michael,

Are you aware of a problem in parallel_tests where some features fail when running in parallel and pass otherwise? We are using Rails 2.3.5, latest versions of your plugin and we have the following settings:

config.action_controller.perform_caching =true
config.action_controller.session_store = :mem_cache_store

I am Jean-Michel from betterplace.org, non for profit based in Berlin ;-)

Thanks for the good work anyway!

JM

`require': no such file to load

I am trying to run:

parallel_test features/*.feature

but it returns a no such file to load error. Any pointers on how I can make this work?

Adding temporary routes works using "rake spec" but not using "rake parallel:spec"

I am testing ApplicationController using a DummyController and an appropriate route:

class DummyController < ApplicationController
   def index; render :text => "foo"; end
   # ...
end

begin
  _routes = DorBort::Application.routes
  _routes.disable_clear_and_finalize = true
  _routes.clear!
  DorBort::Application.routes_reloader.paths.each{ |path| load(path) }
  _routes.draw do
         get 'app(/:action(/:id))', :controller => 'dummy'
  end
  ActiveSupport.on_load(:action_controller) { _routes.finalize! }
ensure
  _routes.disable_clear_and_finalize = false
end

describe DummyController do
    it "should ..." do
       get :index
       response.body.should include("foo")
    end
    # ...
end

Result using "rake spec": Test passes.

Result using "rspec application_controller_spec.rb": Test passes.

Result using "rake parallel:spec":

No route matches {:action=>"index", :controller=>"dummy"}

Why is this? How can I make these tests pass? I am actually testing before_filters in ApplicationController, the DummyController is just a means to an end.

I tried the anonymous controller method mentioned here http://relishapp.com/rspec/rspec-rails/v/2-1/dir/controller-specs/anonymous-controller but these also don't work; they throw routing errors.

linux database lock when running db:test:purge on postgres

I have this working on my mac 10.6, Rails3, 1.9.2

but when running on linux (debian and ubuntu) CI I keep getting errors when running 'rake parallel:prepare'

in particular, it looks to be occurring with 'rake db:test:purge'

here is the output

** Invoke parallel:prepare (first_time)
** Invoke db:abort_if_pending_migrations (first_time)
** Invoke environment
** Execute db:abort_if_pending_migrations
** Execute parallel:prepare
** Invoke db:schema:dump (first_time)
** Invoke environment
** Execute db:schema:dump
** Invoke parallel:load_schema (first_time)
** Execute parallel:load_schema

* Invoke db:test:load (first_time)* Invoke db:test:load (first_time)
** Invoke db:test:purge (first_time)

** Invoke environment (first_time)
* Execute environment* Invoke db:test:purge (first_time)

** Invoke environment (first_time)
** Execute environment
** Invoke db:test:load (first_time)
** Invoke db:test:purge (first_time)
** Invoke environment (first_time)
** Execute environment
** Invoke db:test:load (first_time)
** Invoke db:test:purge (first_time)
** Invoke environment (first_time)
** Execute environment
** Execute db:test:purge
** Execute db:test:purge
** Execute db:test:purge
** Execute db:test:purge
rake aborted!
PGError: ERROR: database "myapp_test" is being accessed by other users
DETAIL: There are 1 other session(s) using the database.
: DROP DATABASE IF EXISTS "myapp_test"
Tasks: TOP => db:test:load => db:test:purge
** Execute db:test:load
** Execute db:test:load
** Execute db:test:load
** Invoke db:schema:load (first_time)
** Invoke environment
** Execute db:schema:load
** Invoke db:schema:load (first_time)
** Invoke environment
** Execute db:schema:load
** Invoke db:schema:load (first_time)
** Invoke environment
** Execute db:schema:load

not shown are a lot of create table statements - so some of the processes are completing, but one fails - though I can't yet determine which process has a lock on that db

any help much appreciated

Rails 3 warnings

Rails 3 requires the task directory to be inside lib. Also need to replace the constants RAILS_ENV and RAILS_ROOT by Rails.env and Rails.root

Removal of :path_prefix option

I recently upgraded parallel & parallel_tests used on a project that has specs residing in a Rails plugin. For convenience, I use a special rake task to run features, plugin specs, and app specs that looked something like the rake task in this gist...

https://gist.github.com/1198638

I noticed that these commits replaced the :path_prefix option with the :pattern option...

23942fa
cfd03c9
b02ed64
8715156

With the path_prefix option ignored, the custom rake task now runs the app specs twice instead of running those for the plugin. This is by no means a bug in the parallel_tests gem since it is doing exactly what it is designed to do.

Before working on a patch reinstating use of the :path_prefix (or maybe allowing the :root directory to be overridden), I thought I would check if you had a particular reason to remove the option? If it is not in line with your current road map, I can make do without. =)

specs failing with factory_girl

My specs are green using rake spec.
While running rake parallel:create, rake parallel prepare and rake parallel:spec, I am having an exception :

"Validation failed: Email has already been taken"

Here is my factory :

Factory.sequence :email do |n|
  "test#{n}@example.com"
end

Factory.define :user_unactivated, :class=>'user' do |u|
 u.email { Factory.next(:email) }
 u.password "4let"
 u.first_name { Faker::Name.first_name }
 u.last_name { Faker::Name.last_name }
 u.zip_code { Faker.numerify('#####') }
 u.terms_of_use true
end

I also tried using database_cleaner in my spec_helper, cleaning after each test database, but failed.

I am running on ubuntu with rails 2.3.X, rspec 1.3.0 and parallel_tests on a with 8 cores machine.(X3440 @ 2.53GHz).

ci_reporter integration

i am trying to integrate parallel tests with hudson and could not get the ci_reporter tasks to work, as it does not execute the tests via rake.

do you have any pointers how to integrate this, or anyone you know who has already integrated some ci with parallel tests?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.