Fixed race in tests.
This commit is contained in:
@@ -14,9 +14,11 @@ class FlexNBD
|
|||||||
end
|
end
|
||||||
|
|
||||||
def serve(ip, port, file, *acl)
|
def serve(ip, port, file, *acl)
|
||||||
|
File.unlink(ctrl) if File.exists?(ctrl)
|
||||||
@pid = fork do
|
@pid = fork do
|
||||||
exec("#{@bin} serve #{ip} #{port} #{file} #{ctrl} #{acl.join(' ')}")
|
exec("#{@bin} serve #{ip} #{port} #{file} #{ctrl} #{acl.join(' ')}")
|
||||||
end
|
end
|
||||||
|
sleep 0.1 until File.socket?(ctrl)
|
||||||
end
|
end
|
||||||
|
|
||||||
def kill
|
def kill
|
||||||
|
Reference in New Issue
Block a user