Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Léo-Paul Géneau
gitlab-ce
Commits
ba302454
Commit
ba302454
authored
Sep 06, 2017
by
Rémy Coutable
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'test-wait-gitaly-boot' into 'master'
Wait for gitaly to boot during tests See merge request !14051
parents
99852965
1dce0a27
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
0 deletions
+18
-0
spec/support/test_env.rb
spec/support/test_env.rb
+18
-0
No files found.
spec/support/test_env.rb
View file @
ba302454
...
@@ -176,6 +176,24 @@ module TestEnv
...
@@ -176,6 +176,24 @@ module TestEnv
spawn_script
=
Rails
.
root
.
join
(
'scripts/gitaly-test-spawn'
).
to_s
spawn_script
=
Rails
.
root
.
join
(
'scripts/gitaly-test-spawn'
).
to_s
@gitaly_pid
=
Bundler
.
with_original_env
{
IO
.
popen
([
spawn_script
],
&
:read
).
to_i
}
@gitaly_pid
=
Bundler
.
with_original_env
{
IO
.
popen
([
spawn_script
],
&
:read
).
to_i
}
wait_gitaly
end
def
wait_gitaly
sleep_time
=
10
sleep_interval
=
0.1
socket
=
Gitlab
::
GitalyClient
.
address
(
'default'
).
sub
(
'unix:'
,
''
)
Integer
(
sleep_time
/
sleep_interval
).
times
do
begin
Socket
.
unix
(
socket
)
return
rescue
sleep
sleep_interval
end
end
raise
"could not connect to gitaly at
#{
socket
.
inspect
}
after
#{
sleep_time
}
seconds"
end
end
def
stop_gitaly
def
stop_gitaly
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment