C#: Pin tests and disable .NET 10 tests.#20935
Conversation
There was a problem hiding this comment.
Pull request overview
This PR addresses test stability issues with .NET 10 on MacOS runners by skipping affected tests and pinning SDK versions to prevent version-related failures across the C# integration test suite.
- Skip .NET 10 integration tests due to crashes in the info command
- Pin test SDK versions to 9.0.304 for consistency across multiple test suites
- Pin blazor_net_8 test to SDK version 8.0.401
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| csharp/ql/integration-tests/all-platforms/dotnet_10/test.py | Adds pytest skip decorators to disable both .NET 10 tests |
| csharp/ql/integration-tests/posix/standalone_dependencies_nuget_config_fallback/global.json | Pins SDK to version 9.0.304 |
| csharp/ql/integration-tests/posix/standalone_dependencies_nuget_config_error_timeout/global.json | Pins SDK to version 9.0.304 |
| csharp/ql/integration-tests/all-platforms/standalone_failed/global.json | Pins SDK to version 9.0.304 |
| csharp/ql/integration-tests/all-platforms/blazor_net_8/global.json | Pins SDK to version 8.0.401 for .NET 8 compatibility |
| csharp/ql/integration-tests/all-platforms/blazor_build_mode_none/global.json | Pins SDK to version 9.0.304 |
| csharp/ql/integration-tests/all-platforms/blazor/global.json | Pins SDK to version 9.0.304 |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review for a chance to win a $100 gift card. Take the survey.
| @pytest.mark.skip(reason=".NET 10 info command crashes") | ||
| def test1(codeql, csharp): | ||
| codeql.database.create() | ||
|
|
||
| @pytest.mark.skip(reason=".NET 10 info command crashes") |
There was a problem hiding this comment.
The PR description states tests should be "marked as flaky", but the implementation uses @pytest.mark.skip which completely disables the tests. Consider using @pytest.mark.xfail instead if you want to mark them as expected to fail while still running them, or update the PR description to clarify that the tests are being skipped/disabled rather than marked as flaky.
| @pytest.mark.skip(reason=".NET 10 info command crashes") | |
| def test1(codeql, csharp): | |
| codeql.database.create() | |
| @pytest.mark.skip(reason=".NET 10 info command crashes") | |
| @pytest.mark.xfail(reason=".NET 10 info command crashes") | |
| def test1(codeql, csharp): | |
| codeql.database.create() | |
| @pytest.mark.xfail(reason=".NET 10 info command crashes") |
In this PR