You'll want to configure config/thinking_sphinx.yml
to include that environment variable TEST_ENV_NUMBER
in the paths for Sphinx files - the settings listed in the deployment page of the docs should be what's required, plus the port number (the mysql41 setting) as well. Perhaps something like this?
test:
mysql41: <%= ENV['TEST_ENV_NUMBER'].to_i + 9307 %>
pid_file: /path/to/app/tmp/searchd.<%= ENV['TEST_ENV_NUMBER' %>.pid
indices_location: /path/to/app/db/sphinx/<%= ENV['TEST_ENV_NUMBER' %>
configuration_file: /path/to/app/config/test.<%= ENV['TEST_ENV_NUMBER' %>.sphinx.conf
binlog_path: /path/to/app/db/sphinx/<%= ENV['TEST_ENV_NUMBER' %>/binlog
I've not used this approach (or parallel_test
) myself, so this is certainly guesswork, but it's worth a shot.