[ARVADOS] updated: 0b2005c4d8e1f8a5e1563373eb1eb49a908b7540
git at public.curoverse.com
git at public.curoverse.com
Mon Dec 15 14:45:38 EST 2014
Summary of changes:
apps/workbench/Gemfile | 10 ++++++++--
apps/workbench/lib/tasks/test_performance.rake | 6 ------
apps/workbench/test/performance_test_helper.rb | 4 ++--
3 files changed, 10 insertions(+), 10 deletions(-)
delete mode 100644 apps/workbench/lib/tasks/test_performance.rake
discards 739f6e8722bb4ce8fc130149dfeba7b87149c8c6 (commit)
via 0b2005c4d8e1f8a5e1563373eb1eb49a908b7540 (commit)
This update added new revisions after undoing existing revisions. That is
to say, the old revision is not a strict subset of the new revision. This
situation occurs when you --force push a change and generate a repository
containing something like this:
* -- * -- B -- O -- O -- O (739f6e8722bb4ce8fc130149dfeba7b87149c8c6)
\
N -- N -- N (0b2005c4d8e1f8a5e1563373eb1eb49a908b7540)
When this happens we assume that you've already had alert emails for all
of the O revisions, and so we here report only the revisions in the N
branch from the common base, B.
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 0b2005c4d8e1f8a5e1563373eb1eb49a908b7540
Author: Tom Clegg <tom at curoverse.com>
Date: Mon Dec 15 14:40:32 2014 -0500
4754: Move perf/prof deps to :test/:performance groups.
Move "do not reset unless Rails.env==test" logic into one place.
diff --git a/apps/workbench/Gemfile b/apps/workbench/Gemfile
index f095c48..49f82f5 100644
--- a/apps/workbench/Gemfile
+++ b/apps/workbench/Gemfile
@@ -37,12 +37,20 @@ group :development do
gem 'ruby-debug-passenger'
end
-group :test do
- gem 'rvm-capistrano'
+group :test, :diagnostics do
gem 'selenium-webdriver'
gem 'capybara'
gem 'poltergeist'
gem 'headless'
+end
+
+group :test, :performance 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.
@@ -92,6 +100,3 @@ gem "deep_merge", :require => 'deep_merge/rails_compat'
gem 'morrisjs-rails'
gem 'raphael-rails'
-
-gem 'rails-perftest'
-gem 'ruby-prof'
diff --git a/apps/workbench/test/diagnostics_test_helper.rb b/apps/workbench/test/diagnostics_test_helper.rb
index 09dc0bb..c7433bb 100644
--- a/apps/workbench/test/diagnostics_test_helper.rb
+++ b/apps/workbench/test/diagnostics_test_helper.rb
@@ -6,7 +6,7 @@ require 'yaml'
# will not be executed.
# Command to run diagnostics tests:
-# RAILS_ENV=diagnostics bundle exec rake TEST=test/diagnostics/*.rb
+# RAILS_ENV=diagnostics bundle exec rake TEST=test/diagnostics/**/*.rb
class DiagnosticsTest < ActionDispatch::IntegrationTest
@@ -29,9 +29,4 @@ class DiagnosticsTest < ActionDispatch::IntegrationTest
end
end
- # Diagnostics tests never want to reset the database fixtures.
- protected
- def self.reset_api_fixtures_now
- end
-
end
diff --git a/apps/workbench/test/performance_test_helper.rb b/apps/workbench/test/performance_test_helper.rb
index 7c40354..7d335d8 100644
--- a/apps/workbench/test/performance_test_helper.rb
+++ b/apps/workbench/test/performance_test_helper.rb
@@ -6,15 +6,16 @@ require 'integration_helper'
# RAILS_ENV=test bundle exec rake test:benchmark
#
# 2. Against a configured workbench url using "RAILS_ENV=performance".
-# RAILS_ENV=performance bundle exec rake TEST=test/performance/*.rb
+# RAILS_ENV=performance bundle exec rake test:benchmark
class WorkbenchPerformanceTest < ActionDispatch::PerformanceTest
- # When running in "RAILS_ENV=performance" mode, uses performance config params.
- # In this mode, prepends workbench URL to the given path provided,
- # and visits that page using the configured "user_token".
+ # When running in "RAILS_ENV=performance" mode, uses performance
+ # config params. In this mode, prepends workbench URL to the given
+ # path provided, and visits that page using the configured
+ # "user_token".
def visit_page_with_token path='/'
- if ENV["RAILS_ENV"].eql? 'performance'
+ if Rails.env == 'performance'
token = Rails.configuration.user_token
workbench_url = Rails.configuration.arvados_workbench_url
if workbench_url.end_with? '/'
@@ -28,9 +29,4 @@ class WorkbenchPerformanceTest < ActionDispatch::PerformanceTest
visit page_with_token(token, (workbench_url + path))
end
- # We do not want to reset the database fixtures in "RAILS_ENV=performance" mode.
- protected
- def self.reset_api_fixtures_now
- end
-
end
diff --git a/apps/workbench/test/test_helper.rb b/apps/workbench/test/test_helper.rb
index 1e7b8eb..2b480f9 100644
--- a/apps/workbench/test/test_helper.rb
+++ b/apps/workbench/test/test_helper.rb
@@ -267,6 +267,10 @@ class ActiveSupport::TestCase
protected
def self.reset_api_fixtures_now
+ # Never try to reset fixtures when we're just using test
+ # infrastructure to run performance/diagnostics suites.
+ return unless Rails.env == 'test'
+
auth = api_fixture('api_client_authorizations')['admin_trustedclient']
Thread.current[:arvados_api_token] = auth['api_token']
ArvadosApiClient.new.api(nil, '../../database/reset', {})
-----------------------------------------------------------------------
hooks/post-receive
--
More information about the arvados-commits
mailing list