[ARVADOS] updated: fed95824264369e705b9f148f857295644dae138

git at public.curoverse.com git at public.curoverse.com
Tue Mar 10 11:30:10 EDT 2015


Summary of changes:
 apps/workbench/test/test_helper.rb | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

       via  fed95824264369e705b9f148f857295644dae138 (commit)
      from  6058d8a2af0a7461f9a412b1b69948e4d0e9224f (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 fed95824264369e705b9f148f857295644dae138
Author: Tom Clegg <tom at curoverse.com>
Date:   Tue Mar 10 11:17:25 2015 -0400

    5105: Restore previous token in an ensure block.

diff --git a/apps/workbench/test/test_helper.rb b/apps/workbench/test/test_helper.rb
index 695d01a..fdde55d 100644
--- a/apps/workbench/test/test_helper.rb
+++ b/apps/workbench/test/test_helper.rb
@@ -36,8 +36,11 @@ class ActiveSupport::TestCase
     auth = api_fixture('api_client_authorizations')[token_name.to_s]
     Thread.current[:arvados_api_token] = auth['api_token']
     if block_given?
-      yield
-      Thread.current[:arvados_api_token] = was
+      begin
+        yield
+      ensure
+        Thread.current[:arvados_api_token] = was
+      end
     end
   end
 

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


hooks/post-receive
-- 




More information about the arvados-commits mailing list