Optimize test performance: collection fixtures, parallel execution, disable analyzers#71
Merged
antosubash merged 6 commits intomainfrom Apr 4, 2026
Merged
Conversation
…isable analyzers - Share one WebApplicationFactory per test assembly via collection fixtures instead of spinning up a separate factory per test class - Add test.runsettings with MaxCpuCount=0 for parallel assembly execution - Disable analyzers and Roslynator in test projects via Directory.Build.targets - Exclude Benchmarks project from dotnet test (IsTestProject=false) - Import root targets in modules/Directory.Build.targets for proper inheritance
…down The main loop passed stoppingToken to FlushBatchAsync. If StopAsync cancelled the token mid-flush (during ToDictionaryAsync or SaveChangesAsync), entries already consumed from the channel were lost. Use CancellationToken.None for in-loop flushes, matching the drain path that already does this.
…llection fixtures Reverts analyzer disabling (RunAnalyzers/EnforceCodeStyleInBuild) to maintain code quality checks in test projects. Only removes Roslynator from test projects. Adds CA1711 pragma suppression to IntegrationTestCollection files since the 'Collection' suffix is an xUnit naming convention.
…n name, move CA1711 to editorconfig - Add EnsureTablesCreated<EmailDbContext> (was missing after ReplaceDbContext) - Define TestCollections.Integration constant to replace raw "Integration" string in 36+ locations (prevents silent typo mismatches) - Suppress CA1711 globally in .editorconfig instead of per-file pragmas - Fix stale comment in Tests.Shared.csproj about linked compile
Cli.Tests spawns dotnet build on generated projects, taking ~15 minutes. Exclude from default run (same as LoadTests/Benchmarks). Run explicitly: dotnet test tests/SimpleModule.Cli.Tests
Deploying simplemodule-website with
|
| Latest commit: |
cfc859d
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://d12327af.simplemodule-website.pages.dev |
| Branch Preview URL: | https://claude-optimize-test-perform.simplemodule-website.pages.dev |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
instead of spinning up a separate factory per test class