Skip to content

Conversation

aidanharan
Copy link
Contributor

If you do not check the database version then the schema cache is not initialized.

Fixes test ActiveRecord::ConnectionAdapters::SchemaCacheTest.test_when_lazily_load_schema_cache_is_set_cache_is_lazily_populated_when_est_connection.

https://github.com/rails-sqlserver/activerecord-sqlserver-adapter/actions/runs/6496031218/job/17642131292

Error:
ActiveRecord::ConnectionAdapters::SchemaCacheTest#test_when_lazily_load_schema_cache_is_set_cache_is_lazily_populated_when_est_connection:
NoMethodError: undefined method `size' for nil:NilClass
    rails (319256ac4708) activerecord/test/cases/connection_adapters/schema_cache_test.rb:392:in `test_when_lazily_load_schema_cache_is_set_cache_is_lazily_populated_when_est_connection'

@aidanharan aidanharan marked this pull request as ready for review October 12, 2023 15:39
@aidanharan aidanharan merged commit 46d304a into main Oct 12, 2023
@aidanharan aidanharan deleted the schema-cache-initialise-when-checking-version branch October 12, 2023 15:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant