From 8793197c0818aad22a9243ceb8f49194ad443b34 Mon Sep 17 00:00:00 2001 From: Rodrigo Souto Date: Thu, 12 Sep 2013 12:49:40 -0300 Subject: [PATCH] [postgres-tests] Removing obsolete test --- test/integration/performance_test.rb | 30 ------------------------------ 1 file changed, 0 insertions(+), 30 deletions(-) diff --git a/test/integration/performance_test.rb b/test/integration/performance_test.rb index ff70caf..fa1fa07 100644 --- a/test/integration/performance_test.rb +++ b/test/integration/performance_test.rb @@ -52,28 +52,6 @@ class PerformanceTest < ActionController::IntegrationTest a2 = (time2.total - time1.total)/50.0 assert a1 > a2*FACTOR, "#{a1} should be larger than #{a2} by at least a factor of #{FACTOR}" end - - should 'not have a linear increase in time to save enterprise due to amount of products' do - $DISABLE_DELAYED_JOB_TEST_ENV_RUN = true - enterprise0 = Enterprise.create!(:name => 'Enterprise 0', :identifier => 'enterprise0') - enterprise1 = Enterprise.create!(:name => 'Enterprise 1', :identifier => 'enterprise1') - enterprise2 = Enterprise.create!(:name => 'Enterprise 2', :identifier => 'enterprise2') - - create_products(enterprise1,25) - create_products(enterprise2,50) - - enterprise0.reload - enterprise1.reload - enterprise2.reload - - time0 = (Benchmark.measure { 10.times { enterprise0.save! } }).total - time1 = (Benchmark.measure { 10.times { enterprise1.save! } }).total - time2 = (Benchmark.measure { 10.times { enterprise2.save! } }).total - - assert (time1 - time0) < time0*0.5 - assert (time2 - time0) < time0*0.5 - end - protected def create_profile(name) @@ -91,13 +69,5 @@ class PerformanceTest < ActionController::IntegrationTest end end - def create_products(enterprise,n) - number = Product.all.count - pc = ProductCategory.create!(:name => "Any Category #{n}", :environment => Environment.default) - n.times do |i| - Product.create!(:enterprise => enterprise, :product_category => pc, :name => "Product #{i+number+1}") - end - end - end -- libgit2 0.21.2