[ARVADOS] created: cd4f50633b256fdf38ae749e6f00ace10c7d45c0

git at public.curoverse.com git at public.curoverse.com
Tue Jan 13 16:51:02 EST 2015


        at  cd4f50633b256fdf38ae749e6f00ace10c7d45c0 (commit)


commit cd4f50633b256fdf38ae749e6f00ace10c7d45c0
Merge: 3e48456 5f4ca24
Author: Tom Clegg <tom at curoverse.com>
Date:   Tue Jan 13 16:49:50 2015 -0500

    3021: Merge branch 'master' into 3021-workbench-perf


commit 3e4845620b14d478d088de0ca73ce227353623b7
Author: Tom Clegg <tom at curoverse.com>
Date:   Tue Jan 13 10:33:53 2015 -0500

    3021: Do not check user notifications unless they are going to be displayed.

diff --git a/apps/workbench/app/controllers/application_controller.rb b/apps/workbench/app/controllers/application_controller.rb
index c757517..8f78da6 100644
--- a/apps/workbench/app/controllers/application_controller.rb
+++ b/apps/workbench/app/controllers/application_controller.rb
@@ -16,7 +16,6 @@ class ApplicationController < ActionController::Base
   before_filter :accept_uuid_as_id_param, except: ERROR_ACTIONS
   before_filter :check_user_agreements, except: ERROR_ACTIONS
   before_filter :check_user_profile, except: ERROR_ACTIONS
-  before_filter :check_user_notifications, except: ERROR_ACTIONS
   before_filter :load_filters_and_paging_params, except: ERROR_ACTIONS
   before_filter :find_object_by_uuid, except: [:create, :index, :choose] + ERROR_ACTIONS
   theme :select_theme
@@ -664,26 +663,12 @@ class ApplicationController < ActionController::Base
     }
   }
 
-  def check_user_notifications
-    return if params['tab_pane']
-
-    @notification_count = 0
-    @notifications = []
-
-    if current_user.andand.is_active
-      @showallalerts = false
-      @@notification_tests.each do |t|
-        a = t.call(self, current_user)
-        if a
-          @notification_count += 1
-          @notifications.push a
-        end
-      end
-    end
-
-    if @notification_count == 0
-      @notification_count = ''
-    end
+  helper_method :user_notifications
+  def user_notifications
+    return [] unless current_user.andand.is_active
+    @notifications ||= @@notification_tests.map do |t|
+      t.call(self, current_user)
+    end.compact
   end
 
   helper_method :all_projects
diff --git a/apps/workbench/app/controllers/users_controller.rb b/apps/workbench/app/controllers/users_controller.rb
index 43a8895..f3f36e6 100644
--- a/apps/workbench/app/controllers/users_controller.rb
+++ b/apps/workbench/app/controllers/users_controller.rb
@@ -139,7 +139,6 @@ class UsersController < ApplicationController
   end
 
   def home
-    @showallalerts = false
     @my_ssh_keys = AuthorizedKey.where(authorized_user_uuid: current_user.uuid)
     @my_tag_links = {}
 
diff --git a/apps/workbench/app/views/layouts/body.html.erb b/apps/workbench/app/views/layouts/body.html.erb
index 5cfa2ca..fb28efe 100644
--- a/apps/workbench/app/views/layouts/body.html.erb
+++ b/apps/workbench/app/views/layouts/body.html.erb
@@ -41,7 +41,7 @@
 
             <li class="dropdown notification-menu">
               <a href="#" class="dropdown-toggle" data-toggle="dropdown" id="notifications-menu">
-                <span class="badge badge-alert notification-count"><%= @notification_count %></span>
+                <span class="badge badge-alert notification-count"><%= user_notifications.length if user_notifications.any? %></span>
                 <%= current_user.email %> <span class="caret"></span>
               </a>
               <ul class="dropdown-menu" role="menu">
@@ -52,10 +52,9 @@
                 <% end %>
                 <% end %>
                 <li role="menuitem"><a href="<%= logout_path %>" role="menuitem"><i class="fa fa-sign-out fa-fw"></i> Log out</a></li>
-                <% if current_user.is_active and
-                      (@notifications || []).length > 0 %>
+                <% if user_notifications.any? %>
                   <li role="presentation" class="divider"></li>
-                  <% @notifications.each_with_index do |n, i| %>
+                  <% user_notifications.each_with_index do |n, i| %>
                     <% if i > 0 %><li class="divider"></li><% end %>
                     <li class="notification"><%= n.call(self) %></li>
                   <% end %>

commit 288d22d8a7ff1f9a441d2b8058382e807873d7d5
Author: Tom Clegg <tom at curoverse.com>
Date:   Tue Jan 13 10:18:16 2015 -0500

    3021: Add web-inspectable profiling mode.
    
    * Run Workbench with environment variable ENABLE_PROFILING=yes. Timing
      figures should appear at the top left of each page. Click to get
      more detail.
    
    * Visit {workbench-uri}?pp=flamegraph to see a profiling graph instead
      of the requested page itself.
    
    * More: https://github.com/MiniProfiler/rack-mini-profiler

diff --git a/apps/workbench/Gemfile b/apps/workbench/Gemfile
index 3a22648..eb38380 100644
--- a/apps/workbench/Gemfile
+++ b/apps/workbench/Gemfile
@@ -1,7 +1,7 @@
 source 'https://rubygems.org'
 
 gem 'rails', '~> 4.1.0'
-gem 'arvados', '>= 0.1.20141114230720'
+gem 'arvados', '>= 0.1.20150111195521'
 
 gem 'sqlite3'
 
@@ -29,6 +29,8 @@ end
 group :development do
   gem 'byebug'
   gem 'ruby-debug-passenger'
+  gem 'rack-mini-profiler', require: false
+  gem 'flamegraph', require: false
 end
 
 group :test, :diagnostics do
diff --git a/apps/workbench/Gemfile.lock b/apps/workbench/Gemfile.lock
index 4132189..c72f256 100644
--- a/apps/workbench/Gemfile.lock
+++ b/apps/workbench/Gemfile.lock
@@ -40,7 +40,7 @@ GEM
     andand (1.3.3)
     angularjs-rails (1.3.8)
     arel (5.0.1.20140414130214)
-    arvados (0.1.20141114230720)
+    arvados (0.1.20150111195521)
       activesupport (>= 3.2.13)
       andand (~> 1.3, >= 1.3.3)
       google-api-client (~> 0.6.3, >= 0.6.3)
@@ -94,7 +94,12 @@ GEM
     extlib (0.9.16)
     faraday (0.8.9)
       multipart-post (~> 1.2.0)
+    fast_stack (0.1.0)
+      rake
+      rake-compiler
     ffi (1.9.6)
+    flamegraph (0.1.0)
+      fast_stack
     google-api-client (0.6.4)
       addressable (>= 2.3.2)
       autoparse (>= 0.3.3)
@@ -160,6 +165,8 @@ GEM
       multi_json (~> 1.0)
       websocket-driver (>= 0.2.0)
     rack (1.5.2)
+    rack-mini-profiler (0.9.2)
+      rack (>= 1.1.3)
     rack-test (0.6.3)
       rack (>= 1.0)
     rails (4.1.9)
@@ -179,6 +186,8 @@ GEM
       rake (>= 0.8.7)
       thor (>= 0.18.1, < 2.0)
     rake (10.4.2)
+    rake-compiler (0.9.5)
+      rake
     raphael-rails (2.1.2)
     ref (1.0.5)
     ruby-debug-passenger (0.2.0)
@@ -249,7 +258,7 @@ DEPENDENCIES
   RedCloth
   andand
   angularjs-rails
-  arvados (>= 0.1.20141114230720)
+  arvados (>= 0.1.20150111195521)
   bootstrap-sass (~> 3.1.0)
   bootstrap-tab-history-rails
   bootstrap-x-editable-rails
@@ -257,6 +266,7 @@ DEPENDENCIES
   capybara
   coffee-rails
   deep_merge
+  flamegraph
   headless
   httpclient (~> 2.5)
   jquery-rails
@@ -270,6 +280,7 @@ DEPENDENCIES
   passenger
   piwik_analytics
   poltergeist
+  rack-mini-profiler
   rails (~> 4.1.0)
   rails-perftest
   raphael-rails
diff --git a/apps/workbench/config/initializers/rack_mini_profile.rb b/apps/workbench/config/initializers/rack_mini_profile.rb
new file mode 100644
index 0000000..a554734
--- /dev/null
+++ b/apps/workbench/config/initializers/rack_mini_profile.rb
@@ -0,0 +1,5 @@
+if not Rails.env.production? and ENV['ENABLE_PROFILING']
+  require 'rack-mini-profiler'
+  require 'flamegraph'
+  Rack::MiniProfilerRails.initialize! Rails.application
+end

commit 251cc49d99c14d28942636fbcef9515bd39c9575
Author: Tom Clegg <tom at curoverse.com>
Date:   Sun Jan 11 14:55:21 2015 -0500

    3021: Optimize manifest parsing.

diff --git a/sdk/ruby/lib/arvados/keep.rb b/sdk/ruby/lib/arvados/keep.rb
index acf8099..d966727 100644
--- a/sdk/ruby/lib/arvados/keep.rb
+++ b/sdk/ruby/lib/arvados/keep.rb
@@ -18,12 +18,18 @@ module Keep
     #   sign-timestamp ::= <8 lowercase hex digits>
     attr_reader :hash, :hints, :size
 
+    LOCATOR_REGEXP = /^([[:xdigit:]]{32})(\+([[:digit:]]+))?(\+([[:upper:]][[:alnum:]+ at _-]*))?$/
+
     def initialize(hasharg, sizearg, hintarg)
       @hash = hasharg
       @size = sizearg
       @hints = hintarg
     end
 
+    def self.valid? tok
+      !!(LOCATOR_REGEXP.match tok)
+    end
+
     # Locator.parse returns a Locator object parsed from the string tok.
     # Returns nil if tok could not be parsed as a valid locator.
     def self.parse(tok)
@@ -41,7 +47,7 @@ module Keep
         raise ArgumentError.new "locator is nil or empty"
       end
 
-      m = /^([[:xdigit:]]{32})(\+([[:digit:]]+))?(\+([[:upper:]][[:alnum:]+ at _-]*))?$/.match(tok.strip)
+      m = LOCATOR_REGEXP.match(tok.strip)
       unless m
         raise ArgumentError.new "not a valid locator #{tok}"
       end
@@ -100,15 +106,21 @@ module Keep
     def each_line
       return to_enum(__method__) unless block_given?
       @text.each_line do |line|
-        tokens = line.split
-        next if tokens.empty?
-        stream_name = unescape(tokens.shift)
-        blocks = []
-        while loc = Locator.parse(tokens.first)
-          blocks << loc
-          tokens.shift
+        stream_name = nil
+        block_tokens = []
+        file_tokens = []
+        line.scan /\S+/ do |token|
+          if stream_name.nil?
+            stream_name = unescape token
+          elsif file_tokens.empty? and Locator.valid? token
+            block_tokens << token
+          else
+            file_tokens << unescape(token)
+          end
         end
-        yield [stream_name, blocks, tokens.map { |s| unescape(s) }]
+        # Ignore blank lines
+        next if stream_name.nil?
+        yield [stream_name, block_tokens, file_tokens]
       end
     end
 
@@ -124,21 +136,33 @@ module Keep
       end
     end
 
-    def each_file_spec(speclist)
+    def split_file_token token
+      start_pos, filesize, filename = token.split(':', 3)
+      [start_pos.to_i, filesize.to_i, filename]
+    end
+
+    def each_file_spec
       return to_enum(__method__, speclist) unless block_given?
-      speclist.each do |filespec|
-        start_pos, filesize, filename = filespec.split(':', 3)
-        yield [start_pos.to_i, filesize.to_i, filename]
+      @text.each_line do |line|
+        stream_name = nil
+        in_file_tokens = false
+        line.scan /\S+/ do |token|
+          if stream_name.nil?
+            stream_name = unescape token
+          elsif in_file_tokens or not Locator.valid? token
+            in_file_tokens = true
+            yield [stream_name] + split_file_token(token)
+          end
+        end
       end
+      true
     end
 
     def files
       if @files.nil?
         file_sizes = Hash.new(0)
-        each_line do |streamname, blocklist, filelist|
-          each_file_spec(filelist) do |_, filesize, filename|
-            file_sizes[[streamname, filename]] += filesize
-          end
+        each_file_spec do |streamname, _, filesize, filename|
+          file_sizes[[streamname, filename]] += filesize
         end
         @files = file_sizes.each_pair.map do |(streamname, filename), size|
           [streamname, filename, size]
@@ -157,11 +181,9 @@ module Keep
         return files.size
       end
       seen_files = {}
-      each_line do |streamname, blocklist, filelist|
-        each_file_spec(filelist) do |_, _, filename|
-          seen_files[[streamname, filename]] = true
-          return stop_after if (seen_files.size >= stop_after)
-        end
+      each_file_spec do |streamname, _, _, filename|
+        seen_files[[streamname, filename]] = true
+        return stop_after if (seen_files.size >= stop_after)
       end
       seen_files.size
     end
@@ -178,9 +200,8 @@ module Keep
       if want_file.nil?
         want_stream, want_file = File.split(want_stream)
       end
-      each_line do |stream_name, _, filelist|
-        if (stream_name == want_stream) and
-            each_file_spec(filelist).any? { |_, _, name| name == want_file }
+      each_file_spec do |streamname, _, _, name|
+        if streamname == want_stream and name == want_file
           return true
         end
       end

commit 220be2d936dc16190bbfa40f44f3be69a36432e3
Author: Tom Clegg <tom at curoverse.com>
Date:   Sun Jan 11 03:01:26 2015 -0500

    3021: Update bundle.

diff --git a/apps/workbench/Gemfile b/apps/workbench/Gemfile
index 49f82f5..3a22648 100644
--- a/apps/workbench/Gemfile
+++ b/apps/workbench/Gemfile
@@ -1,13 +1,8 @@
 source 'https://rubygems.org'
 
 gem 'rails', '~> 4.1.0'
-gem 'minitest', '>= 5.0.0'
-
 gem 'arvados', '>= 0.1.20141114230720'
 
-# Bundle edge Rails instead:
-# gem 'rails', :git => 'git://github.com/rails/rails.git'
-
 gem 'sqlite3'
 
 gem 'multi_json'
@@ -24,12 +19,11 @@ gem 'coffee-rails'
 # Gems used only for assets and not required
 # in production environments by default.
 group :assets do
-  gem 'sass-rails', '~> 4.0.4'
+  gem 'sass-rails'
+  gem 'uglifier', '>= 1.0.3'
 
   # See https://github.com/sstephenson/execjs#readme for more supported runtimes
   gem 'therubyracer', :platforms => :ruby
-
-  gem 'uglifier', '>= 1.0.3'
 end
 
 group :development do
@@ -38,23 +32,21 @@ group :development do
 end
 
 group :test, :diagnostics do
+  gem 'minitest', '>= 5.0.0'
   gem 'selenium-webdriver'
   gem 'capybara'
   gem 'poltergeist'
   gem 'headless'
 end
 
-group :test, :performance do
+group :test do
   gem 'rails-perftest'
   gem 'ruby-prof'
-end
-
-group :test do
   gem 'rvm-capistrano'
   # Note: "require: false" here tells bunder not to automatically
   # 'require' the packages during application startup. Installation is
   # still mandatory.
-  gem 'simplecov', '~> 0.7.1', require: false
+  gem 'simplecov', '~> 0.7', require: false
   gem 'simplecov-rcov', require: false
   gem 'mocha', require: false
 end
@@ -91,7 +83,7 @@ gem 'andand'
 gem 'RedCloth'
 
 gem 'piwik_analytics'
-gem 'httpclient', '~> 2.5.0'
+gem 'httpclient', '~> 2.5'
 
 # This fork has Rails 4 compatible routes
 gem 'themes_for_rails', git: 'https://github.com/holtkampw/themes_for_rails', ref: '1fd2d7897d75ae0d6375f4c390df87b8e91ad417'
diff --git a/apps/workbench/Gemfile.lock b/apps/workbench/Gemfile.lock
index d29c16e..4132189 100644
--- a/apps/workbench/Gemfile.lock
+++ b/apps/workbench/Gemfile.lock
@@ -10,27 +10,27 @@ GEM
   remote: https://rubygems.org/
   specs:
     RedCloth (4.2.9)
-    actionmailer (4.1.8)
-      actionpack (= 4.1.8)
-      actionview (= 4.1.8)
+    actionmailer (4.1.9)
+      actionpack (= 4.1.9)
+      actionview (= 4.1.9)
       mail (~> 2.5, >= 2.5.4)
-    actionpack (4.1.8)
-      actionview (= 4.1.8)
-      activesupport (= 4.1.8)
+    actionpack (4.1.9)
+      actionview (= 4.1.9)
+      activesupport (= 4.1.9)
       rack (~> 1.5.2)
       rack-test (~> 0.6.2)
-    actionview (4.1.8)
-      activesupport (= 4.1.8)
+    actionview (4.1.9)
+      activesupport (= 4.1.9)
       builder (~> 3.1)
       erubis (~> 2.7.0)
-    activemodel (4.1.8)
-      activesupport (= 4.1.8)
+    activemodel (4.1.9)
+      activesupport (= 4.1.9)
       builder (~> 3.1)
-    activerecord (4.1.8)
-      activemodel (= 4.1.8)
-      activesupport (= 4.1.8)
+    activerecord (4.1.9)
+      activemodel (= 4.1.9)
+      activesupport (= 4.1.9)
       arel (~> 5.0.0)
-    activesupport (4.1.8)
+    activesupport (4.1.9)
       i18n (~> 0.6, >= 0.6.9)
       json (~> 1.7, >= 1.7.7)
       minitest (~> 5.1)
@@ -38,7 +38,7 @@ GEM
       tzinfo (~> 1.1)
     addressable (2.3.6)
     andand (1.3.3)
-    angularjs-rails (1.3.3)
+    angularjs-rails (1.3.8)
     arel (5.0.1.20140414130214)
     arvados (0.1.20141114230720)
       activesupport (>= 3.2.13)
@@ -83,11 +83,12 @@ GEM
       coffee-script-source
       execjs
     coffee-script-source (1.8.0)
-    columnize (0.8.9)
+    columnize (0.9.0)
     commonjs (0.2.7)
     daemon_controller (1.2.0)
     debugger-linecache (1.2.0)
     deep_merge (1.0.1)
+    docile (1.1.5)
     erubis (2.7.0)
     execjs (2.2.2)
     extlib (0.9.16)
@@ -107,12 +108,12 @@ GEM
     headless (1.0.2)
     highline (1.6.21)
     hike (1.2.3)
-    httpclient (2.5.3.3)
-    i18n (0.6.11)
+    httpclient (2.6.0.1)
+    i18n (0.7.0)
     jquery-rails (3.1.2)
       railties (>= 3.0, < 5.0)
       thor (>= 0.14, < 2.0)
-    json (1.8.1)
+    json (1.8.2)
     jwt (0.1.13)
       multi_json (>= 1.5)
     launchy (2.4.3)
@@ -127,8 +128,8 @@ GEM
       mime-types (>= 1.16, < 3)
     metaclass (0.0.4)
     mime-types (2.4.3)
-    mini_portile (0.6.1)
-    minitest (5.4.3)
+    mini_portile (0.6.2)
+    minitest (5.5.1)
     mocha (1.1.0)
       metaclass (~> 0.0.1)
     morrisjs-rails (0.5.1)
@@ -139,13 +140,13 @@ GEM
       net-ssh (>= 2.6.5)
     net-sftp (2.1.2)
       net-ssh (>= 2.6.5)
-    net-ssh (2.9.1)
+    net-ssh (2.9.2)
     net-ssh-gateway (1.2.0)
       net-ssh (>= 2.6.5)
-    nokogiri (1.6.4.1)
+    nokogiri (1.6.5)
       mini_portile (~> 0.6.0)
-    oj (2.11.1)
-    passenger (4.0.53)
+    oj (2.11.2)
+    passenger (4.0.57)
       daemon_controller (>= 1.2.0)
       rack
       rake (>= 0.8.1)
@@ -159,25 +160,25 @@ GEM
       multi_json (~> 1.0)
       websocket-driver (>= 0.2.0)
     rack (1.5.2)
-    rack-test (0.6.2)
+    rack-test (0.6.3)
       rack (>= 1.0)
-    rails (4.1.8)
-      actionmailer (= 4.1.8)
-      actionpack (= 4.1.8)
-      actionview (= 4.1.8)
-      activemodel (= 4.1.8)
-      activerecord (= 4.1.8)
-      activesupport (= 4.1.8)
+    rails (4.1.9)
+      actionmailer (= 4.1.9)
+      actionpack (= 4.1.9)
+      actionview (= 4.1.9)
+      activemodel (= 4.1.9)
+      activerecord (= 4.1.9)
+      activesupport (= 4.1.9)
       bundler (>= 1.3.0, < 2.0)
-      railties (= 4.1.8)
+      railties (= 4.1.9)
       sprockets-rails (~> 2.0)
     rails-perftest (0.0.5)
-    railties (4.1.8)
-      actionpack (= 4.1.8)
-      activesupport (= 4.1.8)
+    railties (4.1.9)
+      actionpack (= 4.1.9)
+      activesupport (= 4.1.9)
       rake (>= 0.8.7)
       thor (>= 0.18.1, < 2.0)
-    rake (10.4.0)
+    rake (10.4.2)
     raphael-rails (2.1.2)
     ref (1.0.5)
     ruby-debug-passenger (0.2.0)
@@ -185,12 +186,13 @@ GEM
     rubyzip (1.1.6)
     rvm-capistrano (1.5.5)
       capistrano (~> 2.15.4)
-    sass (3.2.19)
-    sass-rails (4.0.4)
+    sass (3.4.9)
+    sass-rails (5.0.1)
       railties (>= 4.0.0, < 5.0)
-      sass (~> 3.2.2)
-      sprockets (~> 2.8, < 2.12)
-      sprockets-rails (~> 2.0)
+      sass (~> 3.1)
+      sprockets (>= 2.8, < 4.0)
+      sprockets-rails (>= 2.0, < 4.0)
+      tilt (~> 1.1)
     selenium-webdriver (2.44.0)
       childprocess (~> 0.5)
       multi_json (~> 1.0)
@@ -201,19 +203,20 @@ GEM
       faraday (~> 0.8.1)
       jwt (>= 0.1.5)
       multi_json (>= 1.0.0)
-    simplecov (0.7.1)
+    simplecov (0.9.1)
+      docile (~> 1.1.0)
       multi_json (~> 1.0)
-      simplecov-html (~> 0.7.1)
-    simplecov-html (0.7.1)
+      simplecov-html (~> 0.8.0)
+    simplecov-html (0.8.0)
     simplecov-rcov (0.2.3)
       simplecov (>= 0.4.1)
     slop (3.6.0)
-    sprockets (2.11.3)
+    sprockets (2.12.3)
       hike (~> 1.2)
       multi_json (~> 1.0)
       rack (~> 1.0)
       tilt (~> 1.1, != 1.3.0)
-    sprockets-rails (2.2.0)
+    sprockets-rails (2.2.2)
       actionpack (>= 3.0)
       activesupport (>= 3.0)
       sprockets (>= 2.8, < 4.0)
@@ -227,12 +230,14 @@ GEM
     tilt (1.4.1)
     tzinfo (1.2.2)
       thread_safe (~> 0.1)
-    uglifier (2.5.3)
+    uglifier (2.7.0)
       execjs (>= 0.3.0)
       json (>= 1.8.0)
     uuidtools (2.1.5)
     websocket (1.2.1)
-    websocket-driver (0.4.0)
+    websocket-driver (0.5.1)
+      websocket-extensions (>= 0.1.0)
+    websocket-extensions (0.1.1)
     wiselinks (1.2.1)
     xpath (2.0.0)
       nokogiri (~> 1.3)
@@ -253,7 +258,7 @@ DEPENDENCIES
   coffee-rails
   deep_merge
   headless
-  httpclient (~> 2.5.0)
+  httpclient (~> 2.5)
   jquery-rails
   less
   less-rails
@@ -272,9 +277,9 @@ DEPENDENCIES
   ruby-prof
   rvm-capistrano
   sass
-  sass-rails (~> 4.0.4)
+  sass-rails
   selenium-webdriver
-  simplecov (~> 0.7.1)
+  simplecov (~> 0.7)
   simplecov-rcov
   sqlite3
   sshkey

commit 591446b97754292031a4214f08039adebd56cfe8
Author: Tom Clegg <tom at curoverse.com>
Date:   Sun Jan 11 02:36:35 2015 -0500

    3021: Do not drop/create API database at startup: run-tests.sh does that for us.

diff --git a/apps/workbench/test/test_helper.rb b/apps/workbench/test/test_helper.rb
index 2b480f9..8acb2bf 100644
--- a/apps/workbench/test/test_helper.rb
+++ b/apps/workbench/test/test_helper.rb
@@ -160,8 +160,6 @@ class ApiServerForTests
                 '--pid-file', @pidfile)
       else
         make_ssl_cert
-        _system('bundle', 'exec', 'rake', 'db:test:load')
-        _system('bundle', 'exec', 'rake', 'db:fixtures:load')
         _system('bundle', 'exec', 'passenger', 'start', '-d', '-p3000',
                 '--pid-file', @pidfile,
                 '--ssl',

commit 77d377e3bbe37ee7dd36691d5ad04ae0def08d4b
Author: Tom Clegg <tom at curoverse.com>
Date:   Sun Jan 11 02:35:29 2015 -0500

    3021: Fix races in performance test.

diff --git a/apps/workbench/test/performance/browsing_test.rb b/apps/workbench/test/performance/browsing_test.rb
index f15e3ea..843aa3a 100644
--- a/apps/workbench/test/performance/browsing_test.rb
+++ b/apps/workbench/test/performance/browsing_test.rb
@@ -18,28 +18,27 @@ class BrowsingTest < WorkbenchPerformanceTest
 
   test "home page" do
     visit_page_with_token
-    wait_for_ajax
     assert_text 'Dashboard'
     assert_selector 'a', text: 'Run a pipeline'
   end
 
   test "search for hash" do
     visit_page_with_token
-    wait_for_ajax
     assert_text 'Dashboard'
 
-    within('.navbar-fixed-top') do
-      page.find_field('search').set('hash')
-      wait_for_ajax
-      page.find('.glyphicon-search').click
+    assert_selector '.navbar-fixed-top'
+    assert_triggers_dom_event 'shown.bs.modal' do
+      within '.navbar-fixed-top' do
+        find_field('search').set 'hash'
+        find('.glyphicon-search').click
+      end
     end
 
     # In the search dialog now. Expect at least one item in the result display.
     within '.modal-content' do
-      wait_for_ajax
       assert_text 'All projects'
       assert_text 'Search'
-      assert(page.has_selector?(".selectable[data-object-uuid]"))
+      assert_selector '.selectable[data-object-uuid]'
       click_button 'Cancel'
     end
   end

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


hooks/post-receive
-- 




More information about the arvados-commits mailing list