1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00
Commit graph

18 commits

Author SHA1 Message Date
Anna Carey
0e9144dcec set encoding to binmode for pipe 2014-01-17 16:49:10 -05:00
Rafael Mendonça França
bd09afb5fb Don't skip tests if we don't need to.
We can conditional define the tests depending on the adapter or
connection.

Lets keep the skip for fail tests that need to be fixed.
2013-11-08 13:59:07 -02:00
Vipul A M
0b6c1f082f rescue from all exceptions in ConnectionManagement#call
Fixes #11497

As `ActiveRecord::ConnectionAdapters::ConnectionManagement` middleware does not rescue from Exception (but only from StandardError),
the Connection Pool quickly runs out of connections when multiple erroneous Requests come in right after each other.

Recueing from all exceptions and not just StandardError, fixes this behaviour.
2013-07-22 14:44:33 +05:30
Aaron Patterson
aaff1a4101 database connections are automatically established after forking.
Connection pools are 1:1 with pids.
2012-02-16 14:33:38 -08:00
Sergey Nartimov
2b812408c9 use Rack::BodyProxy in activerecord middlewares 2012-01-16 14:36:41 +03:00
Aaron Patterson
dde2113867 Move connection resoluion logic to it's own testable class. 2011-11-28 15:23:25 -08:00
Aaron Patterson
2a9a8ad4df break establish_connection to smaller methods 2011-11-28 15:23:24 -08:00
Aaron Patterson
1a0b7ea3c9 adding more tests around database uri parsing 2011-07-21 12:57:05 -07:00
Steve Hodgkiss
50444204cc Fix inconsistencies by being polite to the wrapped body. Needed for Rack::Sendfile to function properly. See issue #1761. 2011-06-18 22:30:01 +01:00
Aaron Patterson
61774e0d49 please use ruby -I lib:test path/to/test.rb, or export RUBY_OPT 2011-06-06 15:47:13 -07:00
Jon Leighton
253bb6b926 Refactor Active Record test connection setup. Please see the 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. 2011-06-04 23:47:03 +01:00
Aaron Patterson
c7b7c6ad1c make sure that active connections are not cleared during test when an exception happens 2011-03-29 15:47:16 -07:00
Aaron Patterson
3b2a032677 clearing active connections in the ConnectionManagement middleware if an exception happens 2011-03-29 15:42:32 -07:00
Aaron Patterson
e5246092d1 proxy body responses so we close database connections after body is flushed 2011-03-29 15:37:07 -07:00
Aaron Patterson
aea1477362 make sure we have an active database connection before running each connection management test 2011-03-28 17:47:46 -07:00
Aaron Patterson
ec0cacc293 testing app delegation from the ConnectionManagement middleware 2011-03-28 16:22:37 -07:00
Aaron Patterson
7b4866e0ae namespacing connection management tests. ❤️ 2011-03-28 16:08:42 -07:00
Aaron Patterson
7ba54ff711 fixing test file name 2010-07-16 13:54:14 -07:00
Renamed from activerecord/test/cases/connection_pool_test.rb (Browse further)