无法使用带有Zeus的parallel_tests创建并行数据库

Ant*_*ard 2 testing rspec ruby-on-rails zeus

我有一个zeus-parallel_tests和他的初始化问题:

我的gemfile:

group :development, :test do
  gem "sqlite3"
  gem "rspec-rails"
  gem "rspec-its"
  gem "guard-rspec"
  gem "quiet_assets"
  gem "dotenv-rails"
  gem "parallel_tests"
  gem "zeus-parallel_tests"
end
Run Code Online (Sandbox Code Playgroud)

然后捆绑,好

我的database.yml配置:

connection: &connection
  adapter: postgresql
  host: localhost
  username: ********
  password: ********
  encoding: utf8
  min_messages: warning

development:
  database: app_development
  <<: *connection

test:
  database: app_test<%= ENV['TEST_ENV_NUMBER'] %>
  <<: *connection

production:
  database: app_production
  <<: *connection
Run Code Online (Sandbox Code Playgroud)

然后zeus-parallel_tests初始化以创建我的custom_plan.rb和zeus.json

但是当我尝试创建我的并行数据库(我有一个具有8个线程的i7)时,我收到一个奇怪的消息:

> rake parallel:create
app_development already exists
app_development already exists
app_development already exists
app_development already exists
app_development already exists
app_development already exists
app_development already exists
app_development already exists
Run Code Online (Sandbox Code Playgroud)

用并行尝试复制我的开发数据库?我希望他复制我的app_test数据库

> rake parallel:drop
> rake parallel:create
PG::Error: ERROR:  duplicate key value violates unique constraint "pg_database_datname_index"
DETAIL:  Key (datname)=(app_development) already exists.
: CREATE DATABASE "app_development" ENCODING = 'utf8'

and

/vendor/bundle/gems/activesupport-4.1.13/lib/active_support/notifications/instrumenter.rb:20:in `instrument'PG::Error: ERROR:  duplicate key value violates unique constraint "pg_database_datname_index"
Run Code Online (Sandbox Code Playgroud)

经过操作后,我只有1个app_test数据库和1个app_development数据库。

任何的想法 ?我不碰custom_plan.rb和zeus.json宙斯没关系rspec没关系Ruby = 2.1.3 Rails = 4.1.13

d3v*_*kit 5

我在使用parallel_specsgem 时遇到了同样的问题(不是zeus一个问题)-我相信它正在尝试在开发环境中运行。我不确定这是否是我的应用程序或gem中的问题,但我必须为此明确设置RAILS_ENV才能工作:

RAILS_ENV=test bundle exec rake parallel:setup
RAILS_ENV=test bundle exec rake parallel:spec
Run Code Online (Sandbox Code Playgroud)