[ARVADOS] updated: 23a65392c4dd88f28cbf94ac451bd1f1d9cd0be4
git at public.curoverse.com
git at public.curoverse.com
Tue Mar 25 15:10:04 EDT 2014
Summary of changes:
apps/workbench/test/integration_helper.rb | 11 ++++++++---
1 files changed, 8 insertions(+), 3 deletions(-)
via 23a65392c4dd88f28cbf94ac451bd1f1d9cd0be4 (commit)
from 64cdcaf6b38437c459bce30445e547c274e3f99e (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
commit 23a65392c4dd88f28cbf94ac451bd1f1d9cd0be4
Author: Brett Smith <brett at curoverse.com>
Date: Tue Mar 25 15:10:24 2014 -0400
workbench: Timeout integration test Rails launch.
diff --git a/apps/workbench/test/integration_helper.rb b/apps/workbench/test/integration_helper.rb
index d5de331..8616283 100644
--- a/apps/workbench/test/integration_helper.rb
+++ b/apps/workbench/test/integration_helper.rb
@@ -51,14 +51,19 @@ class IntegrationTestRunner < MiniTest::Unit
_system('bundle', 'exec', 'rake', 'db:test:load')
_system('bundle', 'exec', 'rake', 'db:fixtures:load')
_system('bundle', 'exec', 'rails', 'server', '-d')
+ timeout = Time.now.tv_sec + 10
begin
+ sleep 0.2
begin
server_pid = IO.read(SERVER_PID_PATH).to_i
+ good_pid = (server_pid > 0) and (Process.kill(0, pid) rescue false)
rescue Errno::ENOENT
- sleep 0.2
+ good_pid = false
end
- end until (not server_pid.nil?) and (server_pid > 0) and
- (Process.kill(0, server_pid) rescue false)
+ end while (not good_pid) and (Time.now.tv_sec < timeout)
+ if not good_pid
+ raise RuntimeError, "could not find API server Rails pid"
+ end
server_pid
end
begin
-----------------------------------------------------------------------
hooks/post-receive
--
More information about the arvados-commits
mailing list