aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/cases/query_cache_test.rb
Commit message (Collapse)AuthorAgeFilesLines
* Publish AS::Executor and AS::Reloader APIsMatthew Draper2016-03-021-43/+13
| | | | | | These should allow external code to run blocks of user code to do "work", at a similar unit size to a web request, without needing to get intimate with ActionDipatch.
* Removed mocha from Active Record Part 1Ronak Jangir2015-08-251-32/+37
|
* PostgreSQL, Fix OID based type casts in C for primitive types.Lars Kanis2015-03-251-1/+1
| | | | | | | | | | The type map was introduced in aafee23, but wasn't properly filled. This mainly adjusts many locations, that expected strings instead of integers or boolean. add_pg_decoders is moved after setup of the StatementPool, because execute_and_clear could potentially make use of it.
* Revert ":cut: remove unnecessary rescue Exceptions"Yves Senn2015-03-061-1/+1
| | | | | | | | | | | | | | | | | This reverts commit ff18049ca6f27deb7e7f955478e1464f8d756332. This broke the AR build for every adapter: 1) Error: AssociationCallbacksTest#test_dont_add_if_before_callback_raises_exception: Exception: You can't add a post 2) Failure: QueryCacheTest#test_query_cache_doesnt_leak_cached_results_of_rolled_back_queries [/Users/senny/Projects/rails/activerecord/test/cases/query_cache_test.rb:235]: Expected: 1 Actual: 0 I'm reverting to get the build green again.
* :cut: remove unnecessary rescue ExceptionsAaron Patterson2015-03-051-1/+1
|
* Restore query cache on rollbackFlorian Weingarten2014-12-011-0/+32
|
* Make select_all on query cache accept a Relation without binds.Arthur Neves2014-03-131-0/+8
| | | | | [fixes #14361] [related #13886]
* use `teardown` for cleanup, not `setup`.Yves Senn2014-01-161-5/+2
| | | | | | | | | | | | This solves order dependent issues where the last test leaked the query cache state. This resulted in the following error: ``` QueryCacheExpiryTest#test_cache_is_expired_by_habtm_delete [test/cases/query_cache_test.rb:275]: not all expectations were satisfied unsatisfied expectations: - expected exactly twice, invoked once: #<ActiveRecord::ConnectionAdapters::SQLite3Adapter:0x7f93e0c65838>.clear_query_cache(any_parameters) ```
* Currently, we clear query_cache in cache block finish, even if we may ↵Vipul A M2013-12-031-0/+9
| | | | | | already have cache true. This commit takes into account the last cache_enabled value, before clearing query_cache.
* Standardize the use of current_adapter?Rafael Mendonça França2013-01-011-1/+1
|
* Fix #6951. Use query cache/uncache, when using not only database.yml but ↵kennyj2012-10-311-0/+11
| | | | also DATABASE_URL.
* Cleanup trailing whitespacesdfens2012-10-121-1/+1
|
* Restore connection_id on error.kennyj2012-07-231-0/+12
|
* fixing tests to deal with data differences between prepared statements and ↵Aaron Patterson2012-07-131-1/+1
| | | | | | | non-prepared statements Conflicts: activerecord/test/cases/query_cache_test.rb
* Disable query cache for lock queriesDamir Zekic2012-07-061-0/+8
| | | | Fixes #867
* Remove warnings and unused codeRafael Mendonça França2012-06-111-5/+0
|
* current AR::ConnectionAdapters::SQLite3Adapter supports only SQLite3 ~> 1.3.6Akira Matsuda2012-06-121-1/+1
|
* remove calls to find(:first), find(:last) and find(:all)Jon Leighton2012-04-261-3/+3
|
* Remove IdentityMapCarlos Antonio da Silva2012-03-131-1/+1
|
* use Rack::BodyProxy in activerecord middlewaresSergey Nartimov2012-01-161-13/+6
|
* Added failing test case for changing schema in migration not clearing the ↵Joe Van Dyk2011-10-271-0/+12
| | | | prepared statement cache
* Fixed BodyProxy.new for tests! for wrong argumentArun Agrawal2011-10-081-1/+1
|
* fix test error when running with postgresql.Arun Agrawal2011-09-181-2/+4
| | | | | This Sqlite3 should be in if block. Was giving error because sqlite3 is not loaded
* Fixed test for JRuby. Arun Agrawal2011-09-181-1/+2
| | | for Sqlite3 in AR-JDBC.It's Jdbc::SQLite3::VERSION
* fixing typoAaron Patterson2011-08-281-1/+1
|
* clear and disable query cache when an exception is raised from called middlewareAaron Patterson2011-08-281-1/+27
|
* Fix inconsistencies by being polite to the wrapped body. Needed for ↵Steve Hodgkiss2011-06-181-0/+11
| | | | Rack::Sendfile to function properly. See issue #1761.
* 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.
* ensure query cache is cleared when Rack body is closed, fixes bug reported ↵Aaron Patterson2011-05-041-0/+11
| | | | on 951e18abea9c116fc5d6b330ca1dcd2890abe006
* introduce a body proxy to ensure that query cache is enabled during streamingAaron Patterson2011-05-021-0/+26
|
* more tests around cachingAaron Patterson2011-05-021-1/+10
|
* add a couple test cases surrounding query cache middlewareAaron Patterson2011-05-021-0/+18
|
* Use IM when trying to load records using ID.Emilio Tagua2011-04-041-1/+1
| | | | Signed-off-by: José Valim <jose.valim@gmail.com>
* use SQLite3::VERSION rather than the deprecated classAaron Patterson2011-01-101-1/+1
|
* removing many unused variablesAaron Patterson2010-11-161-1/+0
|
* fisting test nameAaron Patterson2010-10-271-1/+1
|
* making query cache work with prepared statementsAaron Patterson2010-10-271-0/+6
|
* one more mysql test left!Aaron Patterson2010-10-261-1/+1
|
* update tests for mysql2 supportBrian Lopez2010-08-021-1/+1
|
* removing unused models from testsSubba Rao Pasupuleti2010-07-211-2/+0
| | | | | | [#5153 state:resolved] Signed-off-by: José Valim <jose.valim@gmail.com>
* Final iteration of use better testing methodsNeeraj Singh2010-05-191-1/+1
| | | | | | [#4652 state:resolved] Signed-off-by: José Valim <jose.valim@gmail.com>
* Clear the query cache between tests that test the query cacheEvan Phoenix2010-03-221-0/+4
|
* future proofing the sqlite3 adapter codeAaron Patterson2010-01-261-0/+6
| | | | Signed-off-by: Yehuda Katz <wycats@Yehuda-Katz.local>
* Oracle adapter recourns count() as numeric (not string)Raimonds Simanovskis2009-08-061-1/+6
|
* Bump mocha requirement for Ruby 1.9 compat. Remove uses_mocha.Jeremy Kemper2009-02-031-4/+0
|
* fix tests relying on implicit orderingJeremy Kemper2008-08-261-2/+3
|
* Added missing fixtures for tests which fail to run independently if run ↵Tarmo Tänav2008-08-041-1/+1
| | | | | | after schema reset Signed-off-by: Michael Koziarski <michael@koziarski.com>
* Partial updates include only unsaved attributes. Off by default; set ↵Jeremy Kemper2008-03-311-1/+3
| | | | | | YourClass.partial_updates = true to enable. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9157 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Merge branch 'ar-test-cleanup' of git://git.geeksomnia.com/railsJeremy Kemper2008-01-211-3/+3
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8681 5ecf4fe2-1ee6-0310-87b1-e25e094e27de