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

Open connection in tests if needed #30171

Merged
merged 1 commit into from
Feb 4, 2023
Merged

Open connection in tests if needed #30171

merged 1 commit into from
Feb 4, 2023

Conversation

roji
Copy link
Member

@roji roji commented Jan 29, 2023

Our tests sometimes create a DbCommand (e.g. by calling CreateDbcommand on a queryable, see ExecuteOurDbCommand in RelationalQueryAsserter), and then execute it, assuming the connection is open. This currently works because the test store happens to do UseSqlServer with an open connection. But with some integration of DbDataSource in Npgsql, the connection isn't open at that point; this makes the test open it if necessary.

@roji roji merged commit 5045b40 into dotnet:main Feb 4, 2023
@roji roji deleted the TestThingie branch February 4, 2023 10:53
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.

3 participants