deltacloud-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mfoj...@apache.org
Subject [2/3] git commit: Core: Fixed memory leaks on ruby 1.8.7
Date Fri, 20 Jul 2012 11:54:40 GMT
Core: Fixed memory leaks on ruby 1.8.7

Minitest library seems to load the 'common.rb' file in collection
tests repeatly. This cause to require all DC libraries for every test,
which until a while leads to memory corruption. Note this problem
can be only observed under Ruby 1.8.7.

This patch also bumps sinatra-rabbit to 1.0.10 (minor typo fixed there
to make 1.8.7 tests run smoothly)


Project: http://git-wip-us.apache.org/repos/asf/deltacloud/repo
Commit: http://git-wip-us.apache.org/repos/asf/deltacloud/commit/ae2758fc
Tree: http://git-wip-us.apache.org/repos/asf/deltacloud/tree/ae2758fc
Diff: http://git-wip-us.apache.org/repos/asf/deltacloud/diff/ae2758fc

Branch: refs/heads/master
Commit: ae2758fc4f7cd9fa7ae5e0a37b278406a9884296
Parents: 1fa8ed1
Author: Michal Fojtik <mfojtik@redhat.com>
Authored: Fri Jul 20 13:32:28 2012 +0200
Committer: Michal fojtik <mfojtik@redhat.com>
Committed: Fri Jul 20 13:35:38 2012 +0200

----------------------------------------------------------------------
 server/deltacloud-core.gemspec    |    2 +-
 server/tests/deltacloud/common.rb |   16 +++++++++-------
 2 files changed, 10 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/deltacloud/blob/ae2758fc/server/deltacloud-core.gemspec
----------------------------------------------------------------------
diff --git a/server/deltacloud-core.gemspec b/server/deltacloud-core.gemspec
index 4b54470..9716427 100644
--- a/server/deltacloud-core.gemspec
+++ b/server/deltacloud-core.gemspec
@@ -68,7 +68,7 @@ Gem::Specification.new do |s|
   s.add_dependency('rake', '>= 0.8.7')
   s.add_dependency('haml', '>= 2.2.17')
   s.add_dependency('sinatra', '>= 0.9.4')
-  s.add_dependency('sinatra-rabbit', '>= 1.0.7')
+  s.add_dependency('sinatra-rabbit', '>= 1.0.10')
   s.add_dependency('crack')
   s.add_dependency('rack', '>= 1.0.0')
   s.add_dependency('rack-accept')

http://git-wip-us.apache.org/repos/asf/deltacloud/blob/ae2758fc/server/tests/deltacloud/common.rb
----------------------------------------------------------------------
diff --git a/server/tests/deltacloud/common.rb b/server/tests/deltacloud/common.rb
index 7ba3ec3..23826ad 100644
--- a/server/tests/deltacloud/common.rb
+++ b/server/tests/deltacloud/common.rb
@@ -21,11 +21,13 @@ ENV['RACK_ENV']   = 'test'
 
 # Setup Deltacloud::API Sinatra instance
 #
-Deltacloud::configure do |server|
-  server.root_url '/api'
-  server.version '1.0.0'
-  server.klass 'Deltacloud::API'
-  server.logger Rack::DeltacloudLogger.setup(ENV['API_LOG'], ENV['API_VERBOSE'])
-end
+unless Deltacloud::config[:deltacloud]
+  Deltacloud::configure do |server|
+    server.root_url '/api'
+    server.version '1.0.0'
+    server.klass 'Deltacloud::API'
+    server.logger Rack::DeltacloudLogger.setup(ENV['API_LOG'], ENV['API_VERBOSE'])
+  end
 
-Deltacloud.require_frontend!
+  Deltacloud.require_frontend!
+end


Mime
View raw message