Skip to content

Assert lock#2

Open
p8 wants to merge 2 commits intomasterfrom
assert-lock
Open

Assert lock#2
p8 wants to merge 2 commits intomasterfrom
assert-lock

Conversation

@p8
Copy link
Copy Markdown
Owner

@p8 p8 commented Jun 2, 2021

No description provided.

@p8 p8 force-pushed the assert-lock branch 9 times, most recently from 9554006 to 59f0b57 Compare June 11, 2021 19:45
MatthewKennedy and others added 2 commits June 11, 2021 22:14
To run the specs against a different database we need to set the DB
environment variable.
The current workflow is missing this env var so it always uses sqlite3.

Some other fixes include:
* Make sure the workflow credentials match the db/database.yml
* Stringify the database configurtation keys for Rails 6.1.
* Changed the branch for the latest Rails version from master to main.
* Add sort_by to the leaves spec to make sure it works on postgres 12.
To fix Rails 6.1 deprecations, some changes were made to scopes in
6c5040c and 247716b.
Testing if the correct rows are locked for updates can be difficult, as
these scopes are only used in the internals.

We can make sure the generated sql is correct by.
The assert_sql implementation has been copied from Rails:
https://github.com/rails/rails/blob/f5abd30f0d1f5916935d1781549ab23273e3963a/activerecord/test/cases/test_case.rb

These specs have been tested first against 3-2-stable to make sure there
are no regressions.
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