Gitaly client times out on rails5 when BUNDLE_GEMFILE is set
There is a gitaly client timeout when trying to run tests on rails5 (GitLab CE master
branch) both locally and on gitlab.com with explicitly setting BUNDLE_GEMFILE
:
% RAILS5=1 BUNDLE_GEMFILE=Gemfile.rails5 rspec spec/models/user_spec.rb
# Deprecation warnings here...
==> Setting up GitLab Shell...
GitLab Shell setup in 0.35702731 seconds...
==> Setting up Gitaly...
Gitaly setup in 10.08966788 seconds...
An error occurred in a `before(:suite)` hook.
Failure/Error: raise "could not connect to gitaly at #{socket.inspect} after #{sleep_time} seconds"
RuntimeError:
could not connect to gitaly at "tmp/tests/gitaly/gitaly.socket" after 10 seconds
# ./spec/support/helpers/test_env.rb:182:in `wait_gitaly'
# ./spec/support/helpers/test_env.rb:165:in `start_gitaly'
# ./spec/support/helpers/test_env.rb:151:in `block in setup_gitaly'
# ./spec/support/helpers/test_env.rb:334:in `component_timed_setup'
# ./spec/support/helpers/test_env.rb:143:in `setup_gitaly'
# ./spec/support/helpers/test_env.rb:85:in `init'
# ./spec/spec_helper.rb:101:in `block (2 levels) in <top (required)>'
Finished in 13.65 seconds (files took 12.42 seconds to load)
0 examples, 0 failures, 1 error occurred outside of examples
BUNDLE_GEMFILE=Gemfile.rails5
causes to the time out.
The expected socket file doesn't get created until the end of the loop in waiting_gitaly
.
Without BUNDLE_GEMFILE=Gemfile.rails5
everything is ok.
Any idea how to fix this?
This is related to migration to Rails 5.0.6.
/cc @zj