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

Move Thread_safety_in_relational_command_cache out of QueryBugsTest #25815

Closed
roji opened this issue Sep 1, 2021 · 6 comments · Fixed by #26670
Closed

Move Thread_safety_in_relational_command_cache out of QueryBugsTest #25815

roji opened this issue Sep 1, 2021 · 6 comments · Fixed by #26670
Assignees
Labels
area-query area-sqlserver area-test closed-fixed The issue has been fixed and is/will be included in the release indicated by the issue milestone. type-bug
Milestone

Comments

@roji
Copy link
Member

roji commented Sep 1, 2021

As part of dotnet/SqlClient#1234, it turns out we have a concurrent test (Thread_safety_in_relational_command_cache) in QueryBugsTest, which reuses the same SqlConnection instance. This isn't an actual problem at the moment since SqlClient's unmanaged Windows networking implementation seems fully thread-safe, but this test would fail badly on Linux/Mac. It also fails/blocks on SqlClient 4.0.0-preview.1.

@smitpatel
Copy link
Member

Move where though?

@roji
Copy link
Member Author

roji commented Sep 1, 2021

I don't know :) We'd have to think of something.

@roji
Copy link
Member Author

roji commented Sep 1, 2021

BTW maybe it can just be in on of the regular test suites - it doesn't need any specific database schema, so any test suite where DbContext instances don't share DbConnections should be fine...

@smitpatel
Copy link
Member

I mean what issue the test particularly have inside query bugs test? As part of deprecating QueryBugsTest, we have non shared model tests which are somewhat provider agnostic.

@roji
Copy link
Member Author

roji commented Sep 3, 2021

Maybe in SqlServerEndToEnd tests?

@AndriySvyryd
Copy link
Member

To make that test use connection string replace the first line with

var contextFactory = await InitializeAsync<MyContext21666>(
    onConfiguring: options =>((IDbContextOptionsBuilderInfrastructure)options).AddOrUpdateExtension(
        options.Options.FindExtension<SqlServerOptionsExtension>()
            .WithConnection(null)
            .WithConnectionString(SqlServerTestStore.CreateConnectionString(StoreName))));

roji added a commit to roji/efcore that referenced this issue Nov 13, 2021
@roji roji added the closed-fixed The issue has been fixed and is/will be included in the release indicated by the issue milestone. label Nov 13, 2021
@ajcvickers ajcvickers modified the milestones: MQ, 7.0.0 Nov 16, 2021
@ajcvickers ajcvickers modified the milestones: 7.0.0, 7.0.0-preview1 Feb 14, 2022
@ajcvickers ajcvickers modified the milestones: 7.0.0-preview1, 7.0.0 Nov 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-query area-sqlserver area-test closed-fixed The issue has been fixed and is/will be included in the release indicated by the issue milestone. type-bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants