aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/cases/pooled_connections_test.rb
Commit message (Collapse)AuthorAgeFilesLines
* Remove dead test code for unsupported adaptersSean Griffin2014-05-171-1/+1
|
* Use teardown helper method.Guo Xiang Tan2014-03-141-1/+1
| | | | | | | | Follow-Up to https://github.com/rails/rails/pull/14348 Ensure that SQLCounter.clear_log is called after each test. This is a step to prevent side effects when running tests. This will allow us to run them in random order.
* remove dead codeAaron Patterson2013-07-081-16/+0
|
* Remove ActiveRecord::ModelJon Leighton2012-10-261-9/+9
| | | | | | | | | | In the end I think the pain of implementing this seamlessly was not worth the gain provided. The intention was that it would allow plain ruby objects that might not live in your main application to be subclassed and have persistence mixed in. But I've decided that the benefit of doing that is not worth the amount of complexity that the implementation introduced.
* ConnectionPool wait_timeout no longer used for different types of timeouts. ↵Jonathan Rochkind2012-05-231-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | #6441 An AR ConnectionSpec `wait_timeout` is pre-patch used for three different things: * mysql2 uses it for MySQL's own wait_timeout (how long MySQL should allow an idle connection before closing it), and defaults to 2592000 seconds. * ConnectionPool uses it for "number of seconds to block and wait for a connection before giving up and raising a timeout error", default 5 seconds. * ConnectionPool uses it for the Reaper, for deciding if a 'dead' connection can be reaped. Default 5 seconds. Previously, if you want to change these from defaults, you need to change them all together. This is problematic _especially_ for the mysql2/ConnectionPool conflict, you will generally _not_ want them to be the same, as evidenced by their wildly different defaults. This has caused real problems for people #6441 #2894 But as long as we're changing this, forcing renaming the ConnectionPool key to be more specific, it made sense to seperate the two ConnectionPool uses too -- these two types of ConnectionPool timeouts ought to be able to be changed independently, you won't neccesarily want them to be the same, even though the defaults are (currently) the same.
* Fix CIJon Leighton2011-12-281-9/+9
|
* Removed test which works only < 1.9Arun Agrawal2011-12-211-8/+0
|
* pushing caching and visitors down to the connectionAaron Patterson2011-11-191-72/+0
|
* Transactional fixtures enlist all active database connections.Jeremy Kemper2011-10-051-0/+2
| | | | You can use multiple databases in your tests without disabling transactional fixtures.
* please use ruby -I lib:test path/to/test.rb, or export RUBY_OPTAaron Patterson2011-06-061-1/+1
|
* Refactor Active Record test connection setup. Please see the ↵Jon Leighton2011-06-041-1/+1
| | | | RUNNING_UNIT_TESTS file for details, but essentially you can now configure things in test/config.yml. You can also run tests directly via the command line, e.g. ruby path/to/test.rb (no rake needed, uses default db connection from test/config.yml). This will help us fix the CI by enabling us to isolate the different Rails versions to different databases.
* implements ActiveRecord::Base.connection_config to be able to check the ↵Xavier Noria2011-03-051-0/+5
| | | | configuration of the current connection at runtime
* Enable the sqlite3 in-memory test connection to workJon Leighton2011-01-111-1/+1
|
* removing useless ternaryAaron Patterson2010-08-191-1/+1
|
* expected value should come first in assert_equalNeeraj Singh2010-05-181-3/+3
| | | | | | [#4630 state:resolved] Signed-off-by: José Valim <jose.valim@gmail.com>
* Move AR logging responsibilities to ActiveRecord::Railties::Subscriber.José Valim2010-01-131-12/+1
|
* Expose connections available in the connection pool.José Valim2010-01-111-0/+2
|
* Resolve deadlock in pooled connections testJeremy Kemper2009-11-101-1/+1
|
* Modify connection pool callbacks to be compatible w/ new styleNick Sieger2009-10-161-2/+19
| | | | Signed-off-by: Yehuda Katz <wycats@gmail.com>
* Tests should use ActiveRecord::Base.connection.rollback_db_transaction to ↵steve2009-05-011-1/+1
| | | | | | rollback a transaction Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
* Ensure ActiveRecord::Base.connection_pool.with_connection creates a new ↵steve2009-05-011-0/+29
| | | | | | connection only when needed [#1752 state:resolved] Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
* Fix typo in pool_conections_test [#1350 state:committed]Amos King2008-11-141-1/+1
| | | | Signed-off-by: David Heinemeier Hansson <david@loudthinking.com>
* Timeout the connection pool monitor on ruby 1.8 onlyJeremy Kemper2008-11-081-4/+7
|
* Make sure ActiveRecord::Base.connected? doesn't raise an exception for ↵Pratik Naik2008-11-061-0/+5
| | | | defined connections
* Ensure ActiveRecord::ConnectionPool.connected? handles undefined ↵Wes Oldenbeuving2008-11-061-0/+8
| | | | | | connections. [#936 state:resolved] Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
* Make clear_active_connections! also return stale connections back to the poolNick Sieger2008-08-291-0/+87
- also clean up some cruft remaining from per-thread connection cache