aboutsummaryrefslogtreecommitdiffstats
path: root/actioncable/test/subscription_adapter
Commit message (Collapse)AuthorAgeFilesLines
* Don't shut down adapters that haven't been setMatthew Draper2016-10-041-1/+1
| | | | We hit when we skip the PostgreSQL adapter.
* Shut down EventMachine before re-enabling warningsMatthew Draper2016-10-022-0/+9
|
* Remove Faye modeMatthew Draper2016-10-011-1/+0
| | | | No deprecation, because it was never documented.
* Add `Style/EmptyLines` in `.rubocop.yml` and remove extra empty linesRyuta Kamizono2016-08-071-2/+0
|
* applies new string literal convention in actioncable/testXavier Noria2016-08-068-70/+70
| | | | | The current code base is not uniform. After some discussion, we have chosen to go with double quotes by default.
* Add guard to broadcast.mmmpa2016-05-261-0/+17
|
* Cable message encodingJeremy Daer2016-03-311-2/+1
| | | | | | | | | | | | | | | | | | | * Introduce a connection coder responsible for encoding Cable messages as WebSocket messages, defaulting to `ActiveSupport::JSON` and duck- typing to any object responding to `#encode` and `#decode`. * Consolidate encoding responsibility to the connection. No longer explicitly JSON-encode from channels or other sources. Pass Cable messages as Hashes to `#transmit` and rely on it to encode. * Introduce stream encoders responsible for decoding pubsub messages. Preserve the currently raw encoding, but make it easy to use JSON. Same duck type as the connection encoder. * Revert recent data normalization/quoting (#23649) which treated `identifier` and `data` values as nested JSON objects rather than as opaque JSON-encoded strings. That dealt us an awkward hand where we'd decode JSON stringsā€¦ or not, but always encode as JSON. Embedding JSON object values directly is preferably, no extra JSON encoding, but that should be a purposeful protocol version change rather than ambiguously, inadvertently supporting multiple message formats.
* 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.
* Shush up EM::Hiredis when running tests.Kasper Timm Hansen2016-03-261-0/+11
| | | | | | | | | | EM::Hiredis were spewing screenfuls of warnings when running the Action Cable tests. Copied over the technique that shushes up faye-websocket in the client tests, so we can reduce the noise ratio. Note: there's still warnings spewed after tests have finished when EM::Hiredis shuts down. I haven't been able to shush them up yet.
* AC: skip PG adapter tests if the db isn't availableJeremy Daer2016-03-111-0/+7
|
* Support faye-websocket + EventMachine as an optionMatthew Draper2016-03-021-0/+1
|
* remove args from assert_nothing_raised in testsTara Scherner de la Fuente2016-02-221-3/+3
|
* Don't rely on the global server as a receiver.Kasper Timm Hansen2016-02-141-6/+0
| | | | | | | | | | | | | | | | The `WorkerTest`'s `Receiver` is imporsonating an `ActionCable::Connection::Base`, but just delegates the logger to `ActionCable.logger`. This creates a mismatch as the connection requires the logger to be a `TaggedLoggerProxy`'ied logger, while the server doesn't. Thus to ensure an exception isn't raised when the worker tries to call `tag` other tests have to assign a proxied logger to their test server. Instead of forcing change on other tests, have Receiver adhere to the connection contract and use a `TaggedLoggerProxy`. As a consequence remove more setup from the tests.
* Default connection class to ActionCable::Connection::Base.Kasper Timm Hansen2016-02-141-8/+0
| | | | | | | Instead of depending on ApplicationCable::Connection being defined at initialize we should inject it in the Railtie. Thus we can kill more setup in the tests too.
* Inject Rails' channel paths in engine.Kasper Timm Hansen2016-02-141-8/+0
| | | | | | | | | | | | | We were explicitly referencing Rails.root in ActionCable::Server::Configuration.initialize, thereby coupling ourselves to Rails. Instead add `app/channels` to Rails' app paths and assign the existent files to `channel_paths`. Users can still append to those load paths with `<<` and `push` in `config/application.rb`. This means we can remove the custom `Dir` lookup in `channel_paths` and the Rails and root definitions in the tests.
* Switch the default redis adapter to a single-stream modelMatthew Draper2016-02-012-1/+17
| | | | | | This new adapter does get a little more intimate with the redis-rb gem's implementation than I would like, but it's the least bad of the approaches I've come up with.
* Revert "Revert "Eliminate the EventMachine dependency""Matthew Draper2016-01-301-3/+0
|
* Revert "Eliminate the EventMachine dependency"David Heinemeier Hansson2016-01-271-0/+3
|
* Ditch the EM error logging helperMatthew Draper2016-01-241-1/+0
| | | | | | We're no longer doing our work in the EM event loop, so errors are quite unlikely, and if they do occur, they're not really our responsibility to handle.
* Using a hacked faye-websocket, drop EventMachineMatthew Draper2016-01-241-2/+0
|
* Add tests for the ActionCable adaptersMatthew Draper2016-01-245-0/+218
|
* ActionCable::StorageAdapter ==> ActionCable::SubscriptionAdapterJon Moss2016-01-181-0/+73