[ARVADOS] updated: 64cdcaf6b38437c459bce30445e547c274e3f99e

git at public.curoverse.com git at public.curoverse.com
Tue Mar 25 14:36:49 EDT 2014


Summary of changes:
 apps/workbench/README.textile             |    2 ++
 apps/workbench/test/integration_helper.rb |   14 +++++++++-----
 2 files changed, 11 insertions(+), 5 deletions(-)

       via  64cdcaf6b38437c459bce30445e547c274e3f99e (commit)
       via  b65cb64f0d7865266bd8674e681cd0f48fd476c7 (commit)
      from  bf53b14daa894c77ea2b9413e9a574897446a2b7 (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 64cdcaf6b38437c459bce30445e547c274e3f99e
Author: Brett Smith <brett at curoverse.com>
Date:   Tue Mar 25 14:36:48 2014 -0400

    workbench: Improve integration test Rails launch.
    
    The previous version was susceptible to a race condition where it
    would read the file after Rails created it, but before it actually
    wrote a pid to it.  This would cause the rake test task to kill itself
    later by running Process.kill('TERM', 0).

diff --git a/apps/workbench/test/integration_helper.rb b/apps/workbench/test/integration_helper.rb
index 8e317ba..d5de331 100644
--- a/apps/workbench/test/integration_helper.rb
+++ b/apps/workbench/test/integration_helper.rb
@@ -51,11 +51,15 @@ 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 + 5
-      while (not File.exists? SERVER_PID_PATH) and (Time.now.tv_sec < timeout)
-        sleep 0.2
-      end
-      IO.read(SERVER_PID_PATH).to_i
+      begin
+        begin
+          server_pid = IO.read(SERVER_PID_PATH).to_i
+        rescue Errno::ENOENT
+          sleep 0.2
+        end
+      end until (not server_pid.nil?) and (server_pid > 0) and
+        (Process.kill(0, server_pid) rescue false)
+      server_pid
     end
     begin
       super(args)

commit b65cb64f0d7865266bd8674e681cd0f48fd476c7
Author: Brett Smith <brett at curoverse.com>
Date:   Tue Mar 25 14:01:23 2014 -0400

    workbench: Document deployment Bundle testing.

diff --git a/apps/workbench/README.textile b/apps/workbench/README.textile
index e249b13..ea01724 100644
--- a/apps/workbench/README.textile
+++ b/apps/workbench/README.textile
@@ -8,6 +8,8 @@ The Workbench application includes a series of integration tests.  When you run
 
 In addition to bundled gems, running the integration tests requires "PhantomJS":http://phantomjs.org/download.html to test JavaScript elements.  The simplest way to get started is to download one of the binary builds provided, and install the executable into one of the directories in your @$PATH at .
 
+If you install the Workbench Bundle in deployment mode, you must also install the API server Bundle in deployment mode, and vice versa.  If your Bundle installs have mismatched modes, the integration tests will fail with "Gem not found" errors.
+
 h2. Writing tests
 
 Integration tests are written with Capybara, which drives a fully-featured Web browser to interact with Workbench exactly as a user would.

-----------------------------------------------------------------------


hooks/post-receive
-- 




More information about the arvados-commits mailing list