[ARVADOS] updated: 1a39dff7af0bb939cff4b1e0521e9945d13f023f

Git user git at public.curoverse.com
Thu May 5 10:55:49 EDT 2016


Summary of changes:
 build/run-tests.sh                                     |  8 ++++----
 .../test/integration/collections_performance_test.rb   | 18 ++++++++++--------
 services/api/test/integration/database_reset_test.rb   |  3 +++
 services/api/test/integration/websocket_test.rb        |  6 ++++++
 services/api/test/test_helper.rb                       |  4 ++++
 services/api/test/unit/collection_performance_test.rb  |  1 +
 6 files changed, 28 insertions(+), 12 deletions(-)

       via  1a39dff7af0bb939cff4b1e0521e9945d13f023f (commit)
       via  be414b02c5e6063a5c5045ebcf77337915f39f1d (commit)
      from  50f8ae2c283cb65d61cae70c29bf6a5bdaa26bf9 (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 1a39dff7af0bb939cff4b1e0521e9945d13f023f
Merge: 50f8ae2 be414b0
Author: Tom Clegg <tom at curoverse.com>
Date:   Thu May 5 10:54:58 2016 -0400

    Merge branch '9017-apiserver-short-tests'
    
    refs #9017


commit be414b02c5e6063a5c5045ebcf77337915f39f1d
Author: Tom Clegg <tom at curoverse.com>
Date:   Thu May 5 10:09:07 2016 -0400

    9017: Skip some slow API server tests in --short mode.

diff --git a/build/run-tests.sh b/build/run-tests.sh
index d656d91..d229341 100755
--- a/build/run-tests.sh
+++ b/build/run-tests.sh
@@ -754,7 +754,7 @@ stop_services
 test_apiserver() {
     rm -f "$WORKSPACE/services/api/git-commit.version"
     cd "$WORKSPACE/services/api" \
-        && RAILS_ENV=test bundle exec rake test TESTOPTS=-v ${testargs[services/api]}
+        && env RAILS_ENV=test ${short:+RAILS_TEST_SHORT=1} bundle exec rake test TESTOPTS=-v ${testargs[services/api]}
 }
 do_test services/api apiserver
 
@@ -800,21 +800,21 @@ done
 test_workbench() {
     start_nginx_proxy_services \
         && cd "$WORKSPACE/apps/workbench" \
-        && RAILS_ENV=test bundle exec rake test TESTOPTS=-v ${testargs[apps/workbench]}
+        && env RAILS_ENV=test ${short:+RAILS_TEST_SHORT=1} bundle exec rake test TESTOPTS=-v ${testargs[apps/workbench]}
 }
 do_test apps/workbench workbench
 
 test_workbench_benchmark() {
     start_nginx_proxy_services \
         && cd "$WORKSPACE/apps/workbench" \
-        && RAILS_ENV=test bundle exec rake test:benchmark ${testargs[apps/workbench_benchmark]}
+        && env RAILS_ENV=test ${short:+RAILS_TEST_SHORT=1} bundle exec rake test:benchmark ${testargs[apps/workbench_benchmark]}
 }
 do_test apps/workbench_benchmark workbench_benchmark
 
 test_workbench_profile() {
     start_nginx_proxy_services \
         && cd "$WORKSPACE/apps/workbench" \
-        && RAILS_ENV=test bundle exec rake test:profile ${testargs[apps/workbench_profile]}
+        && env RAILS_ENV=test ${short:+RAILS_TEST_SHORT=1} bundle exec rake test:profile ${testargs[apps/workbench_profile]}
 }
 do_test apps/workbench_profile workbench_profile
 
diff --git a/services/api/test/integration/collections_performance_test.rb b/services/api/test/integration/collections_performance_test.rb
index 77a26e5..a952c20 100644
--- a/services/api/test/integration/collections_performance_test.rb
+++ b/services/api/test/integration/collections_performance_test.rb
@@ -6,6 +6,7 @@ class CollectionsApiPerformanceTest < ActionDispatch::IntegrationTest
   include ManifestExamples
 
   test "crud cycle for a collection with a big manifest" do
+    slow_test
     bigmanifest = time_block 'make example' do
       make_manifest(streams: 100,
                     files_per_stream: 100,
@@ -39,16 +40,17 @@ class CollectionsApiPerformanceTest < ActionDispatch::IntegrationTest
   end
 
   test "memory usage" do
-     hugemanifest = make_manifest(streams: 1,
-                                  files_per_stream: 2000,
-                                  blocks_per_file: 200,
-                                  bytes_per_block: 2**26,
-                                  api_token: api_token(:active))
+    slow_test
+    hugemanifest = make_manifest(streams: 1,
+                                 files_per_stream: 2000,
+                                 blocks_per_file: 200,
+                                 bytes_per_block: 2**26,
+                                 api_token: api_token(:active))
     json = time_block "JSON encode #{hugemanifest.length>>20}MiB manifest" do
       Oj.dump({manifest_text: hugemanifest})
     end
-     vmpeak "post" do
-       post '/arvados/v1/collections', {collection: json}, auth(:active)
-     end
+    vmpeak "post" do
+      post '/arvados/v1/collections', {collection: json}, auth(:active)
+    end
   end
 end
diff --git a/services/api/test/integration/database_reset_test.rb b/services/api/test/integration/database_reset_test.rb
index 58f2abf..ecb2f2a 100644
--- a/services/api/test/integration/database_reset_test.rb
+++ b/services/api/test/integration/database_reset_test.rb
@@ -4,6 +4,7 @@ class DatabaseResetTest < ActionDispatch::IntegrationTest
   self.use_transactional_fixtures = false
 
   test "reset fails when Rails.env != 'test'" do
+    slow_test
     rails_env_was = Rails.env
     begin
       Rails.env = 'production'
@@ -22,6 +23,7 @@ class DatabaseResetTest < ActionDispatch::IntegrationTest
   end
 
   test "database reset doesn't break basic CRUD operations" do
+    slow_test
     active_auth = auth(:active)
     admin_auth = auth(:admin)
 
@@ -48,6 +50,7 @@ class DatabaseResetTest < ActionDispatch::IntegrationTest
   end
 
   test "roll back database change" do
+    slow_test
     active_auth = auth(:active)
     admin_auth = auth(:admin)
 
diff --git a/services/api/test/integration/websocket_test.rb b/services/api/test/integration/websocket_test.rb
index 313a22d..d1b8c34 100644
--- a/services/api/test/integration/websocket_test.rb
+++ b/services/api/test/integration/websocket_test.rb
@@ -323,6 +323,7 @@ class WebsocketTest < ActionDispatch::IntegrationTest
   end
 
   test "connect, subscribe, get event, unsubscribe" do
+    slow_test
     state = 1
     spec = nil
     spec_ev_uuid = nil
@@ -372,6 +373,7 @@ class WebsocketTest < ActionDispatch::IntegrationTest
   end
 
   test "connect, subscribe, get event, unsubscribe with filter" do
+    slow_test
     state = 1
     spec = nil
     spec_ev_uuid = nil
@@ -421,6 +423,7 @@ class WebsocketTest < ActionDispatch::IntegrationTest
 
 
   test "connect, subscribe, get event, try to unsubscribe with bogus filter" do
+    slow_test
     state = 1
     spec = nil
     spec_ev_uuid = nil
@@ -473,6 +476,7 @@ class WebsocketTest < ActionDispatch::IntegrationTest
 
 
   test "connected, not subscribed, no event" do
+    slow_test
     authorize_with :admin
 
     ws_helper :admin, false do |ws|
@@ -493,6 +497,7 @@ class WebsocketTest < ActionDispatch::IntegrationTest
   end
 
   test "connected, not authorized to see event" do
+    slow_test
     state = 1
 
     authorize_with :admin
@@ -608,6 +613,7 @@ class WebsocketTest < ActionDispatch::IntegrationTest
   end
 
   test "connect, subscribe, lots of events" do
+    slow_test
     state = 1
     event_count = 0
     log_start = Log.order(:id).last.id
diff --git a/services/api/test/test_helper.rb b/services/api/test/test_helper.rb
index 881a080..25ab286 100644
--- a/services/api/test/test_helper.rb
+++ b/services/api/test/test_helper.rb
@@ -106,6 +106,10 @@ class ActiveSupport::TestCase
     ArvadosApiToken.new.call("rack.input" => "",
                              "HTTP_AUTHORIZATION" => "OAuth2 #{t}")
   end
+
+  def slow_test
+    skip "RAILS_TEST_SHORT is set" unless (ENV['RAILS_TEST_SHORT'] || '').empty?
+  end
 end
 
 class ActionController::TestCase
diff --git a/services/api/test/unit/collection_performance_test.rb b/services/api/test/unit/collection_performance_test.rb
index 37da5fd..1c6e4f2 100644
--- a/services/api/test/unit/collection_performance_test.rb
+++ b/services/api/test/unit/collection_performance_test.rb
@@ -18,6 +18,7 @@ class CollectionModelPerformanceTest < ActiveSupport::TestCase
 
   # "crrud" == "create read render update delete", not a typo
   test "crrud cycle for a collection with a big manifest)" do
+    slow_test
     bigmanifest = time_block 'make example' do
       make_manifest(streams: 100,
                     files_per_stream: 100,

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


hooks/post-receive
-- 




More information about the arvados-commits mailing list