Skip to content
Browse files

Merge branch 'master' of github.com:chicks/sugarcrm

  • Loading branch information...
2 parents af0fa4b + 9364954 commit 364cbccdeded481d7dd88d9ef4a7c96bdd9c1b43 @chicks chicks committed Aug 26, 2011
Showing with 10 additions and 2 deletions.
  1. +2 −1 lib/sugarcrm/connection_pool.rb
  2. +8 −1 test/test_connection_pool.rb
View
3 lib/sugarcrm/connection_pool.rb
@@ -1,7 +1,8 @@
require 'monitor'
module SugarCRM; class ConnectionPool
- attr_reader :size, :timeout
+ attr_accessor :timeout
+ attr_reader :size
def initialize(session)
@session = session
View
9 test/test_connection_pool.rb
@@ -17,7 +17,7 @@ class TestConnectionPool < ActiveSupport::TestCase
end
end
- should "be able to specify its timeout" do
+ should "be able to specify its timeout on creation" do
default_timeout = SugarCRM.session.connection_pool.timeout
config = SugarCRM.session.config
@@ -29,5 +29,12 @@ class TestConnectionPool < ActiveSupport::TestCase
sess.disconnect!
end
end
+
+ should "be able to specify its timeout after creation" do
+ timeout = SugarCRM.session.connection_pool.timeout
+ SugarCRM.session.connection_pool.timeout += 1
+
+ assert_equal timeout + 1, SugarCRM.session.connection_pool.timeout
+ end
end
end

0 comments on commit 364cbcc

Please sign in to comment.
Something went wrong with that request. Please try again.