-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
Microsoft.Data.Sqlite: Leverage ADO.NET spec tests #13833
Comments
An example of consuming the current NuGet package (and overriding its behaviour) for MySQL is: https://github.com/mysql-net/MySqlConnector/tree/master/tests/Conformance.Tests |
I'd be interested in working on this, but does it really belong in EFCore as opposed to the individual providers, or possibly corefx? |
@bgrainger Didn't you have a table somewhere of which providers fail what tests? I'm starting my 3.0 work and want to look at what breaking changes we should make to Microsoft.Data.Sqlite... |
I've attached the latest "results" file generated locally on my machine. (The zip file should be one self-contained HTML file of the results.) Unfortunately there's no automatic CI build or a website where updated results are published. I tried updating the Microsoft.Data.Sqlite tests to 2.1.0 but just got a wall of |
Updated results with Microsoft.Data.Sqlite 2.0.0 and 2.1.0 side-by-side (columns 3 & 4). Most obvious changes are an exception from |
@bgrainger this is really great work :) Is there a place where provider-specific work can happen, e.g. flag which tests are inapplicable to the provider as opposed to failing? |
To fix the comparison chart itself, individual tests can be overridden on a per-provider level by modifying the provider-specific test project, e.g., https://github.com/mysql-net/AdoNetApiTest/blob/master/tests/MySqlConnector.Tests/MySqlConnectorParameterTests.cs. Open a PR or I could make you a contributor. If you want to add the tests into your own test suite (in npgsql), see https://github.com/mysql-net/AdoNetApiTest#how-to-use; specific examples of overriding behaviour in MySqlConnector are at https://github.com/mysql-net/MySqlConnector/blob/master/tests/Conformance.Tests/ConnectionTests.cs and https://github.com/mysql-net/MySqlConnector/blob/master/tests/Conformance.Tests/GetValueConversionTests.cs. |
@bgrainger thanks! I think these tests belong in individual provider repos, rather than in a single unified place - this way they can evolve with the provider etc. Hopefully we'll have some time to work on this in Npgsql (see npgsql/npgsql#2225). |
Agreed about tests living with the provider; the test applications in AdoNetApiTest are mostly for me to easily check other libraries' behaviour when making design decisions for MySqlConnector; see https://github.com/dotnet/corefx/issues/7810#issuecomment-346109151. |
@roji Let's talk about this in our call. |
@divega I created "shay-as-a-label" so we can tag things now. |
I'm happy to add anyone as a collaborator to https://github.com/mysql-net/AdoNetApiTest if you think it's a good base and want to contribute more to it; just reply here or open an issue. Or we could transfer the repo to the aspnet organisation if this would be a better long-term home. |
Whoa, I'm a label now... |
I just ran the tests on the current master (see this branch). The main issues (in addition there are about 100 tests in the SqliteConnectionDifferences in behavior
SqliteTransactionDifferences in expected exception types
SqliteDataReaderDifferences in behavior
Differences in expected exception types
SqliteParameterDifferences in behavior
The question is how to deal with those test failures: should I file an issue for them or can someone of the EF team go through them. |
Regarding the conformance tests, there are three possibilities for each test failure:
But a conformance test failure doesn't immediately imply a bug in Microsoft.Data.Sqlite that needs an issue to be filed. |
I finally looked through each of the test results for Microsoft.Data.Sqlite. I wasn't concerned by our differences in negative scenarios, but I filed #14682 to address some failures that I do think are bugs in our provider. |
Some progress on dotnet/corefx#7810 has been made in mysql-net/AdoNetApiTest. We should consider leveraging it here.
cc @bgrainger @roji
The text was updated successfully, but these errors were encountered: