Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Patch 1 #168

Closed
wants to merge 7 commits into from
Closed

Patch 1 #168

wants to merge 7 commits into from

Conversation

azyzio
Copy link
Contributor

@azyzio azyzio commented Oct 12, 2024

No description provided.

rosston and others added 7 commits September 20, 2024 21:49
The commit that added
lock_thread (f638085) notes that
> Transaction management is largely ripped straight out of
> test_fixtures.rb in Rails

The commit that adds lock_thread in Rails --
rails/rails@d6466be
-- has some helpful context:
> When a system test starts Puma spins up one thread and Capybara spins
> up another thread. Because of this when tests are run the database
> cannot see what was inserted into the database on teardown. This is
> because there are two threads using two different connections.

> This change uses the statement cache to lock the threads to using a
> single connection ID instead of each not being able to see each other.

So lock_thread exists because there are two different threads -- Puma
and Capybara -- trying to access the same database but not necessarily
seeing the same thing. But! cypress-rails doesn't use Capybara, and more
importantly, it doesn't use tests or a test runner written in Ruby at
all, so there's only _one_ thread trying to use the database. So we
don't need all this thread locking stuff. So let's remove it to make
things more compatible with Rails 7.2.
Taken from #165, hence
the coauthor credit.

Co-authored-by: Georg Ledermann <[email protected]>
Use symlinks for multiple Gemfiles.
This prevents us from installing gems in the example app that aren't
needed by a different gemfile.
@azyzio azyzio closed this Oct 12, 2024
@azyzio azyzio deleted the patch-1 branch October 12, 2024 14:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants