aboutsummaryrefslogtreecommitdiffstats
path: root/actioncable/test/subscription_adapter/postgresql_test.rb
Commit message (Collapse)AuthorAgeFilesLines
* Merge pull request #27577 from maclover7/jm-fix-27547Rafael Mendonça França2018-06-081-0/+23
|\ | | | | | | Action Cable owns database connection, not Active Record
| * Action Cable owns database connection, not Active RecordJon Moss2017-03-251-0/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Before this commit, the database connection used in Action Cable's PostgreSQL adapter was "owned" by `ActiveRecord::Base.connection_pool`. This meant that if, for example, `#clear_reloadable_connections!` was called on the pool, Active Record would "steal" the database connection from Action Cable, and would cause all sorts of issues. This became evident during file reloads; despite Action Cable trying its hardest to return its borrowed database connection to Active Record via `@pubsub.shutdown`, Active Record calls `#clear_reloadable_connections!` on the connection pool, and due to the order of callbacks, Active Record's callback was being executed first. This meant that if you tried to rerender a view after a file was reloaded, you would have to wait through Active Record's timeout and such. Now, Action Cable takes direct ownership of the database connection it uses. It removes the connection from the pool to avoid the situation described above. Action Cable also makes sure to call `#disconnect!` on the connection when appropriate, to match the previous behavior of Active Record. [ Jon Moss & Matthew Draper]
* | Use frozen string literal in actioncable/Kir Shatrov2017-07-231-0/+2
| |
* | Fix postgresql adapter setup for ActionCable testspalkan2017-07-111-1/+1
| | | | | | | | | | (cherry picked from commit e2093c1f678175bde7c37c848686d979427346e1) (cherry picked from commit d7dbe48273bd9e0adb1de5b52e3cdaeb4a65630b)
* | Revert "Merge pull request #29540 from kirs/rubocop-frozen-string"Matthew Draper2017-07-021-1/+0
| | | | | | | | | | This reverts commit 3420a14590c0e6915d8b6c242887f74adb4120f9, reversing changes made to afb66a5a598ce4ac74ad84b125a5abf046dcf5aa.
* | Enforce frozen string in RubocopKir Shatrov2017-07-011-0/+1
| |
* | Use `require_relative` instead of `require` with full pathbogdanvlviv2017-06-141-1/+1
|/
* applies new string literal convention in actioncable/testXavier Noria2016-08-061-9/+9
| | | | | The current code base is not uniform. After some discussion, we have chosen to go with double quotes by default.
* Cable: Shush pop warnings when skipping Postgres tests.Kasper Timm Hansen2016-03-261-0/+1
| | | | | | | | `skip` raises an exception to abort the execution of the test, so `super` would never be called and thus `@rx_adapter` and `@tx_adapter` would never have been defined at the time of teardown. Define them just before skipping and zap the warnings.
* AC: skip PG adapter tests if the db isn't availableJeremy Daer2016-03-111-0/+7
|
* Add tests for the ActionCable adaptersMatthew Draper2016-01-241-0/+32