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

Updating nulldb adapater for 7.1.2 compatibility #32

Merged
merged 1 commit into from
Dec 14, 2023

Conversation

smasry
Copy link
Contributor

@smasry smasry commented Dec 13, 2023

The current version of nulldb doesn't support ActiveRecord 7.1.2

  • Update null db
  • Skip calls to connection.verify! when the null db adapter is in use since it does not implement the reconnect method.
 ✗ rspec spec
2023-12-13 08:58:49 -0800: [INFO] - Using Upsert
.2023-12-13 08:58:49 -0800: [INFO] - Using Update
.2023-12-13 08:58:49 -0800: [INFO] - Using Update
2023-12-13 08:58:49 -0800: [INFO] - Scrubbing ScrubbableModel ...
2023-12-13 08:58:49 -0800: [INFO] -  ScrubbableModel objects scrubbed
2023-12-13 08:58:49 -0800: [INFO] - Scrub Complete!
.2023-12-13 08:58:49 -0800: [INFO] - Using Update
2023-12-13 08:58:49 -0800: [INFO] - Scrubbing ScrubbableModel ...
2023-12-13 08:58:49 -0800: [INFO] -  ScrubbableModel objects scrubbed
2023-12-13 08:58:49 -0800: [INFO] - Scrub Complete!
.....................

Finished in 0.40945 seconds (files took 0.51792 seconds to load)
24 examples, 0 failures

@adamstegman adamstegman requested a review from a team December 14, 2023 16:56
Copy link
Member

@adamstegman adamstegman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks so much for fixing this!

@adamstegman adamstegman merged commit 0b16502 into onemedical:main Dec 14, 2023
adamstegman added a commit that referenced this pull request Dec 15, 2023
nulldb is only loaded in the tests, so using its names in library code raised an exception:

```
NameError: uninitialized constant ActiveRecord::ConnectionAdapters::NullDBAdapter
```

We can instead key off the method that nulldb doesn't implement to fix the same issue as #32.
adamstegman added a commit that referenced this pull request Dec 15, 2023
nulldb is only loaded in the tests, so using its names in library code raised an exception:

```
NameError: uninitialized constant ActiveRecord::ConnectionAdapters::NullDBAdapter
```

We can instead key off the method that nulldb doesn't implement to fix the same issue as #32.
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