https://github.com/jscheid/prevent-writes-test
https://github.com/jscheid/prevent-writes-test
Last synced: 8 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/jscheid/prevent-writes-test
- Owner: jscheid
- Created: 2024-09-12T07:11:12.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2024-09-12T19:56:44.000Z (almost 2 years ago)
- Last Synced: 2025-01-30T04:19:34.786Z (over 1 year ago)
- Language: Ruby
- Size: 6.84 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# `ActionController::Live` vs. `prevent_writes`
WIP trying to create a reproducible test case for an issue we're seeing in our
environment, when combining `ActionController::Live` with
`ActiveRecord::Base.connected_to`.
Run using `docker compose up`. Probably needs a recent Docker version.
The main test is in `test.bash`, which should expose the following behaviour:
- First it issues a GET to the `/ping` endpoint, which works.
- Then it GETs a `ActionController::Live` streaming endpoint and disconnects early.
- Then it issues another GET to the `/ping` endpoint again, which fails with the following error:
`No connection pool for 'ActiveRecord::Base' found for the 'reading' role.`
Most of the files in this repository are just Rails scaffolding, the main
interesting files are the ones in `app/controllers`.