私はzeus-parallel_testsと彼の初期化に問題があります:
私の宝石ファイル:
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
それからバンドル、大丈夫
私の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
次に、zeus-parallel_tests init を作成して、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
並行して開発データベースを複製してみますか? 彼が私の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"
そして、操作後に app_test データベースと app_development データベースが 1 つしかありません。
何か案が ?custom_plan.rb と zeus.json には触れない zeus は OK rspec は OK Ruby = 2.1.3 Rails = 4.1.13