diff --git a/.azure/pipelines/templates/build.yaml b/.azure/pipelines/templates/build.yaml index 792c3965470..9300bf8fbdc 100644 --- a/.azure/pipelines/templates/build.yaml +++ b/.azure/pipelines/templates/build.yaml @@ -243,14 +243,15 @@ jobs: SYSTEM_ACCESSTOKEN: $(System.AccessToken) inputs: command: 'test' + projects: '$(solution)' testRunTitle: ${{suite}} on ${{framework}} - arguments: '--no-build --logger "trx;LogFilePrefix=testresults-${{framework}}-${{suite}}" --framework ${{framework}} --configuration "${{parameters.build_configuration}}" --filter "Provider=None&Suite=${{suite}}" --blame-crash-dump-type full --blame-hang-timeout 10m --blame-hang-dump-type full -- -parallel none -noshadow' - publishTestResults: false # Doesn't merge correctly, use the explicit PublishTestResults task instead + arguments: '--no-build --report-trx --report-trx-filename "testresults-${{framework}}-${{suite}}-{asm}_{tfm}_{arch}.trx" --framework ${{framework}} --configuration "${{parameters.build_configuration}}" --filter-query "/[(Provider=None)&(Suite=${{suite}})]" --minimum-expected-tests 1 --crashdump --crashdump-type Full --hangdump --hangdump-timeout 10m --hangdump-type Full --max-parallel-test-modules 1' + publishTestResults: false # The next step publishes all module-specific TRX files as one test run. - task: PublishTestResults@2 displayName: Publishing test results condition: succeededOrFailed() inputs: - testResultsFormat: VSTest + testResultsFormat: VSTest # Azure DevOps uses this identifier for the TRX format. testResultsFiles: '**/testresults-*.trx' mergeTestResults: true testRunTitle: ${{suite}} on ${{framework}} diff --git a/.github/copilot-instructions.md b/.github/copilot-instructions.md index 6cd1b379e00..36f4f1aa72b 100644 --- a/.github/copilot-instructions.md +++ b/.github/copilot-instructions.md @@ -1,12 +1,12 @@ ## Build, test, and style commands -* The repo builds with the .NET SDK from `global.json` (`10.0.203`, roll-forward `major`). Do not edit `global.json` unless explicitly asked. +* The repo builds with the .NET SDK from `global.json` (`10.0.400`, roll-forward `major`). Do not edit `global.json` unless explicitly asked. * Build the solution with `dotnet build Orleans.slnx -bl`. CI uses this form and uploads the binlog. * On Windows, `.\Build.cmd` runs `build.ps1`, which restores, builds, and packs `Orleans.slnx`, writes restore/build/pack binlogs, and outputs packages under `Artifacts\`. Set `BuildConfiguration=Release` to build release artifacts. -* Run tests with `dotnet test Orleans.slnx --framework net10.0 -- -parallel none -noshadow`. CI also runs `net8.0`; source projects default to `net8.0;net10.0`. -* Run a category with `dotnet test Orleans.slnx --framework net10.0 --filter "Category=BVT" -- -parallel none -noshadow`. Common categories are `BVT`, `SlowBVT`, `Functional`, and provider-specific categories such as `Redis`, `Cassandra`, `SqlServer`, `Azure`, `AWS`, and `Streaming`. -* Run one test with `dotnet test test\Orleans.Core.Tests\Orleans.Core.Tests.csproj --framework net10.0 --filter "FullyQualifiedName~MyTestClass.MyTestMethod" -- -parallel none -noshadow`. -* `.\Test.cmd` runs the scripted Windows test subset using the default `Category=BVT|Category=SlowBVT` filter. `.\TestAll.cmd` sets `Category=BVT|Category=SlowBVT|Category=Functional`. +* Run tests with `dotnet test --solution Orleans.slnx --framework net10.0 --minimum-expected-tests 1 --max-parallel-test-modules 1`. CI also runs `net8.0`; source projects default to `net8.0;net10.0`. +* Run a category with `dotnet test --solution Orleans.slnx --framework net10.0 --filter-trait "Category=BVT" --minimum-expected-tests 1 --max-parallel-test-modules 1`. Common categories are `BVT`, `SlowBVT`, `Functional`, and provider-specific categories such as `Redis`, `Cassandra`, `SqlServer`, `Azure`, `AWS`, and `Streaming`. +* Run one test with `dotnet test --project test\Orleans.Core.Tests\Orleans.Core.Tests.csproj --framework net10.0 --filter-class "*MyTestClass*" --filter-method "*MyTestMethod*" --minimum-expected-tests 1`. +* `.\Test.cmd` runs the scripted Windows test subset using the default xUnit query filter `/[(Category=BVT)|(Category=SlowBVT)]`. `.\TestAll.cmd` adds the `Functional` category. * Provider tests often need external services, connection-string environment variables, or secrets. Match `.github\workflows\ci.yml` and `test\TestInfrastructure\TestExtensions\TestDefaultConfiguration.cs` for the required setup. * Style is enforced by `dotnet build` because `Directory.Build.props` sets `EnforceCodeStyleInBuild=true` and `TreatWarningsAsErrors=true`. @@ -26,11 +26,11 @@ * Central package management is enabled in `Directory.Packages.props`; add or update package versions there instead of putting versions in individual projects. * Use project references for repo-internal dependencies. `CONTRIBUTING.md` explicitly discourages DLL references and unnecessary `Private=True` metadata. -* `src\Directory.Build.props` makes source projects packable by default; `test\Directory.Build.props` makes test projects non-packable, disables nullable for tests, and copies `test\xunit.runner.json`. +* `src\Directory.Build.props` makes source projects packable by default; `test\Directory.Build.props` makes test projects non-packable and configures MTP test applications. The root `Directory.Build.targets` copies `test\testconfig.json` under each test assembly name. * Build-time code generation is controlled by `OrleansBuildTimeCodeGen=true`, which imports the Orleans code generator and analyzers as build analyzers for framework projects. * Serializable Orleans types that cross grain calls, storage, or streams generally need `[GenerateSerializer]` plus stable `[Id(n)]` members. Do not renumber existing serialization IDs. * Public API changes in packable `src\` projects usually require corresponding generated API-surface changes under `src\api`. -* Tests use xUnit with the custom `[TestCategory("...")]` attribute from `test\TestInfrastructure\TestExtensions\TestCategory.cs`; this maps categories to xUnit traits and keeps `dotnet test --filter "Category=..."` working. +* Tests use xUnit with the custom `[TestCategory("...")]` attribute from `test\TestInfrastructure\TestExtensions\TestCategory.cs`; this maps categories to xUnit traits for `dotnet test --filter-trait "Category=..."`. * Cluster tests usually derive from or compose fixtures in `test\TestInfrastructure\TestExtensions` and configure silos through `TestClusterBuilder`, `ISiloConfigurator`, or `ISiloBuilder`. The default cluster fixture uses in-memory reminders, durable jobs, and grain storage. * Follow `.editorconfig`: C# uses file-scoped namespaces, system directives first, `var` preferences, braces on new lines, `_camelCase` private fields, and preview language features. Nullable is enabled for source projects and disabled for test projects. * Add XML docs for new or changed public APIs even though CS1591 is currently suppressed; package projects generate documentation files. diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ff1e92029a1..4293c27ce16 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -91,13 +91,13 @@ jobs: - name: Test run: dotnet test --framework ${{ matrix.framework }} - --filter "Provider=${{ matrix.provider }}&(Suite=BVT|Suite=SlowBVT|Suite=Functional)&Category!=Performance&Category!=Stress" - --blame-hang-timeout 10m - --blame-crash-dump-type full - --blame-hang-dump-type full - --logger "trx;LogFileName=test_results_${{ matrix.provider }}_${{ matrix.framework }}.trx" - -- - -parallel none -noshadow + --filter-query "/[(Provider=${{ matrix.provider }})&((Suite=BVT)|(Suite=SlowBVT)|(Suite=Functional))&(Category!=Performance)&(Category!=Stress)]" + --minimum-expected-tests 1 + --hangdump --hangdump-timeout 10m + --crashdump --crashdump-type Full + --hangdump-type Full + --report-trx --report-trx-filename "test_results_${{ matrix.provider }}_${{ matrix.framework }}_{asm}_{tfm}_{arch}.trx" + --max-parallel-test-modules 1 env: ORLEANSREDISCONNECTIONSTRING: "localhost:6379,ssl=False,abortConnect=False" - name: Clean up Redis @@ -141,13 +141,13 @@ jobs: - name: Test run: dotnet test --framework ${{ matrix.framework }} - --filter "Provider=${{ matrix.provider }}&(Suite=BVT|Suite=SlowBVT|Suite=Functional)&Category!=Performance&Category!=Stress" - --blame-hang-timeout 10m - --blame-crash-dump-type full - --blame-hang-dump-type full - --logger "trx;LogFileName=test_results_${{ matrix.provider }}_${{ matrix.dbversion }}_${{ matrix.framework }}.trx" - -- - -parallel none -noshadow + --filter-query "/[(Provider=${{ matrix.provider }})&((Suite=BVT)|(Suite=SlowBVT)|(Suite=Functional))&(Category!=Performance)&(Category!=Stress)]" + --minimum-expected-tests 1 + --hangdump --hangdump-timeout 10m + --crashdump --crashdump-type Full + --hangdump-type Full + --report-trx --report-trx-filename "test_results_${{ matrix.provider }}_${{ matrix.dbversion }}_${{ matrix.framework }}_{asm}_{tfm}_{arch}.trx" + --max-parallel-test-modules 1 env: CASSANDRAVERSION: ${{ matrix.dbversion }} - name: Archive Test Results @@ -199,13 +199,13 @@ jobs: - name: Test run: dotnet test --framework ${{ matrix.framework }} - --filter "Provider=${{ matrix.provider }}&(Suite=BVT|Suite=SlowBVT|Suite=Functional)&Category!=Performance&Category!=Stress" - --blame-hang-timeout 10m - --blame-crash-dump-type full - --blame-hang-dump-type full - --logger "trx;LogFileName=test_results_${{ matrix.provider }}_${{ matrix.framework }}.trx" - -- - -parallel none -noshadow + --filter-query "/[(Provider=${{ matrix.provider }})&((Suite=BVT)|(Suite=SlowBVT)|(Suite=Functional))&(Category!=Performance)&(Category!=Stress)]" + --minimum-expected-tests 1 + --hangdump --hangdump-timeout 10m + --crashdump --crashdump-type Full + --hangdump-type Full + --report-trx --report-trx-filename "test_results_${{ matrix.provider }}_${{ matrix.framework }}_{asm}_{tfm}_{arch}.trx" + --max-parallel-test-modules 1 env: # [SuppressMessage("Microsoft.Security", "CS002:SecretInNextLine", Justification="False positive")] ORLEANSPOSTGRESCONNECTIONSTRING: "Server=127.0.0.1;Port=5432;Pooling=false;User Id=postgres;Password=postgres;SSL Mode=Disable" @@ -290,13 +290,13 @@ jobs: - name: Test run: dotnet test --framework ${{ matrix.framework }} - --filter "Provider=${{ matrix.provider }}&(Suite=BVT|Suite=SlowBVT|Suite=Functional)&Category!=Performance&Category!=Stress" - --blame-hang-timeout 10m - --blame-crash-dump-type full - --blame-hang-dump-type full - --logger "trx;LogFileName=test_results_${{ matrix.provider }}_${{ matrix.framework }}.trx" - -- - -parallel none -noshadow + --filter-query "/[(Provider=${{ matrix.provider }})&((Suite=BVT)|(Suite=SlowBVT)|(Suite=Functional))&(Category!=Performance)&(Category!=Stress)]" + --minimum-expected-tests 1 + --hangdump --hangdump-timeout 10m + --crashdump --crashdump-type Full + --hangdump-type Full + --report-trx --report-trx-filename "test_results_${{ matrix.provider }}_${{ matrix.framework }}_{asm}_{tfm}_{arch}.trx" + --max-parallel-test-modules 1 env: # [SuppressMessage("Microsoft.Security", "CS002:SecretInNextLine", Justification="Not a secret")] ORLEANSMYSQLCONNECTIONSTRING: "Server=127.0.0.1;Port=3306;UId=root;Pwd=mariadb;" @@ -352,13 +352,13 @@ jobs: - name: Test run: dotnet test --framework ${{ matrix.framework }} - --filter "Provider=${{ matrix.provider }}&(Suite=BVT|Suite=SlowBVT|Suite=Functional)&Category!=Performance&Category!=Stress" - --blame-hang-timeout 10m - --blame-crash-dump-type full - --blame-hang-dump-type full - --logger "trx;LogFileName=test_results_${{ matrix.provider }}_${{ matrix.framework }}.trx" - -- - -parallel none -noshadow + --filter-query "/[(Provider=${{ matrix.provider }})&((Suite=BVT)|(Suite=SlowBVT)|(Suite=Functional))&(Category!=Performance)&(Category!=Stress)]" + --minimum-expected-tests 1 + --hangdump --hangdump-timeout 10m + --crashdump --crashdump-type Full + --hangdump-type Full + --report-trx --report-trx-filename "test_results_${{ matrix.provider }}_${{ matrix.framework }}_{asm}_{tfm}_{arch}.trx" + --max-parallel-test-modules 1 env: # [SuppressMessage("Microsoft.Security", "CS002:SecretInNextLine", Justification="Not a secret")] ORLEANSMSSQLCONNECTIONSTRING: "Server=127.0.0.1,1433;User Id=SA;Password=yourWeak(!)Password;TrustServerCertificate=True;" @@ -399,13 +399,13 @@ jobs: - name: Test run: dotnet test --framework ${{ matrix.framework }} - --filter "Provider=${{ matrix.provider }}&(Suite=BVT|Suite=SlowBVT|Suite=Functional)&Category!=Performance&Category!=Stress" - --blame-hang-timeout 10m - --blame-crash-dump-type full - --blame-hang-dump-type full - --logger "trx;LogFileName=test_results_${{ matrix.provider }}_${{ matrix.framework }}.trx" - -- - -parallel none -noshadow + --filter-query "/[(Provider=${{ matrix.provider }})&((Suite=BVT)|(Suite=SlowBVT)|(Suite=Functional))&(Category!=Performance)&(Category!=Stress)]" + --minimum-expected-tests 1 + --hangdump --hangdump-timeout 10m + --crashdump --crashdump-type Full + --hangdump-type Full + --report-trx --report-trx-filename "test_results_${{ matrix.provider }}_${{ matrix.framework }}_{asm}_{tfm}_{arch}.trx" + --max-parallel-test-modules 1 - name: Archive Test Results if: always() continue-on-error: true @@ -451,14 +451,14 @@ jobs: global-json-file: global.json - name: Test run: dotnet test - --filter "Provider=${{ matrix.provider }}&(Suite=BVT|Suite=SlowBVT|Suite=Functional)&Category!=Performance&Category!=Stress" + --filter-query "/[(Provider=${{ matrix.provider }})&((Suite=BVT)|(Suite=SlowBVT)|(Suite=Functional))&(Category!=Performance)&(Category!=Stress)]" + --minimum-expected-tests 1 --framework ${{ matrix.framework }} - --blame-hang-timeout 10m - --blame-crash-dump-type full - --blame-hang-dump-type full - --logger "trx;LogFileName=test_results_${{ matrix.provider }}_${{ matrix.framework }}.trx" - -- - -parallel none -noshadow + --hangdump --hangdump-timeout 10m + --crashdump --crashdump-type Full + --hangdump-type Full + --report-trx --report-trx-filename "test_results_${{ matrix.provider }}_${{ matrix.framework }}_{asm}_{tfm}_{arch}.trx" + --max-parallel-test-modules 1 env: # [SuppressMessage("Microsoft.Security", "CS002:SecretInNextLine", Justification="Not a secret")] # [SuppressMessage("Microsoft.Security", "CSCAN0090:ConfigFile", Justification="Not a secret")] @@ -531,14 +531,14 @@ jobs: global-json-file: global.json - name: Test run: dotnet test - --filter "Provider=${{ matrix.provider }}&(Suite=BVT|Suite=SlowBVT|Suite=Functional)&Category!=Performance&Category!=Stress" + --filter-query "/[(Provider=${{ matrix.provider }})&((Suite=BVT)|(Suite=SlowBVT)|(Suite=Functional))&(Category!=Performance)&(Category!=Stress)]" + --minimum-expected-tests 1 --framework ${{ matrix.framework }} - --blame-hang-timeout 10m - --blame-crash-dump-type full - --blame-hang-dump-type full - --logger "trx;LogFileName=test_results_${{ matrix.provider }}_${{ matrix.framework }}.trx" - -- - -parallel none -noshadow + --hangdump --hangdump-timeout 10m + --crashdump --crashdump-type Full + --hangdump-type Full + --report-trx --report-trx-filename "test_results_${{ matrix.provider }}_${{ matrix.framework }}_{asm}_{tfm}_{arch}.trx" + --max-parallel-test-modules 1 env: # [SuppressMessage("Microsoft.Security", "CS002:SecretInNextLine", Justification="Not a secret")] # [SuppressMessage("Microsoft.Security", "CSCAN0090:ConfigFile", Justification="Not a secret")] @@ -612,7 +612,7 @@ jobs: done - name: Test run: | - cosmos_filter='Provider=${{ matrix.provider }}&(Suite=BVT|Suite=SlowBVT|Suite=Functional)&Category!=Performance&Category!=Stress' + cosmos_filter='/[(Provider=${{ matrix.provider }})&((Suite=BVT)|(Suite=SlowBVT)|(Suite=Functional))&(Category!=Performance)&(Category!=Stress)]' for attempt in 1 2; do logger_name="test_results_${{ matrix.provider }}_${{ matrix.framework }}_attempt${attempt}.trx" extra_args=() @@ -622,16 +622,16 @@ jobs: fi if dotnet test \ - test/Extensions/Orleans.Cosmos.Tests/Orleans.Cosmos.Tests.csproj \ + --project test/Extensions/Orleans.Cosmos.Tests/Orleans.Cosmos.Tests.csproj \ --framework ${{ matrix.framework }} \ - --filter "${cosmos_filter}" \ - --blame-hang-timeout 10m \ - --blame-crash-dump-type full \ - --blame-hang-dump-type full \ - --logger "trx;LogFileName=${logger_name}" \ + --filter-query "${cosmos_filter}" \ + --minimum-expected-tests 1 \ + --hangdump --hangdump-timeout 10m \ + --crashdump --crashdump-type Full \ + --hangdump-type Full \ + --report-trx --report-trx-filename "${logger_name}" \ "${extra_args[@]}" \ - -- \ - -parallel none -noshadow; then + --max-parallel-test-modules 1; then exit 0 fi done @@ -681,13 +681,13 @@ jobs: - name: Test run: dotnet test --framework ${{ matrix.framework }} - --filter "Provider=${{ matrix.provider }}&(Suite=BVT|Suite=SlowBVT|Suite=Functional)&Category!=Performance&Category!=Stress" - --blame-hang-timeout 10m - --blame-crash-dump-type full - --blame-hang-dump-type full - --logger "trx;LogFileName=test_results_${{ matrix.provider }}_${{ matrix.framework }}.trx" - -- - -parallel none -noshadow + --filter-query "/[(Provider=${{ matrix.provider }})&((Suite=BVT)|(Suite=SlowBVT)|(Suite=Functional))&(Category!=Performance)&(Category!=Stress)]" + --minimum-expected-tests 1 + --hangdump --hangdump-timeout 10m + --crashdump --crashdump-type Full + --hangdump-type Full + --report-trx --report-trx-filename "test_results_${{ matrix.provider }}_${{ matrix.framework }}_{asm}_{tfm}_{arch}.trx" + --max-parallel-test-modules 1 - name: Archive Test Results if: always() continue-on-error: true @@ -731,13 +731,13 @@ jobs: - name: Test run: dotnet test --framework ${{ matrix.framework }} - --filter "Provider=${{ matrix.provider }}&(Suite=BVT|Suite=SlowBVT|Suite=Functional)&Category!=Performance&Category!=Stress" - --blame-hang-timeout 10m - --blame-crash-dump-type full - --blame-hang-dump-type full - --logger "trx;LogFileName=test_results_${{ matrix.provider }}_${{ matrix.framework }}.trx" - -- - -parallel none -noshadow + --filter-query "/[(Provider=${{ matrix.provider }})&((Suite=BVT)|(Suite=SlowBVT)|(Suite=Functional))&(Category!=Performance)&(Category!=Stress)]" + --minimum-expected-tests 1 + --hangdump --hangdump-timeout 10m + --crashdump --crashdump-type Full + --hangdump-type Full + --report-trx --report-trx-filename "test_results_${{ matrix.provider }}_${{ matrix.framework }}_{asm}_{tfm}_{arch}.trx" + --max-parallel-test-modules 1 env: ORLEANSZOOKEEPERCONNECTIONSTRING: "localhost:2181" - name: Clean up ZooKeeper @@ -794,13 +794,13 @@ jobs: - name: Test run: dotnet test --framework ${{ matrix.framework }} - --filter "Provider=${{ matrix.provider }}&(Suite=BVT|Suite=SlowBVT|Suite=Functional)&Category!=Performance&Category!=Stress" - --blame-hang-timeout 10m - --blame-crash-dump-type full - --blame-hang-dump-type full - --logger "trx;LogFileName=test_results_${{ matrix.provider }}_${{ matrix.framework }}.trx" - -- - -parallel none -noshadow + --filter-query "/[(Provider=${{ matrix.provider }})&((Suite=BVT)|(Suite=SlowBVT)|(Suite=Functional))&(Category!=Performance)&(Category!=Stress)]" + --minimum-expected-tests 1 + --hangdump --hangdump-timeout 10m + --crashdump --crashdump-type Full + --hangdump-type Full + --report-trx --report-trx-filename "test_results_${{ matrix.provider }}_${{ matrix.framework }}_{asm}_{tfm}_{arch}.trx" + --max-parallel-test-modules 1 env: ORLEANSDYNAMODBSERVICE: "http://127.0.0.1:8000" # [SuppressMessage("Microsoft.Security", "CS002:SecretInNextLine", Justification="Not a secret")] @@ -871,15 +871,15 @@ jobs: global-json-file: global.json - name: Test run: dotnet test - test/Extensions/Orleans.AWS.Tests/Orleans.AWS.Tests.csproj + --project test/Extensions/Orleans.AWS.Tests/Orleans.AWS.Tests.csproj --framework ${{ matrix.framework }} - --filter "Provider=${{ matrix.provider }}&(Suite=BVT|Suite=SlowBVT|Suite=Functional)&Category!=Performance&Category!=Stress" - --blame-hang-timeout 10m - --blame-crash-dump-type full - --blame-hang-dump-type full - --logger "trx;LogFileName=test_results_${{ matrix.provider }}_${{ matrix.framework }}.trx" - -- - -parallel none -noshadow + --filter-query "/[(Provider=${{ matrix.provider }})&((Suite=BVT)|(Suite=SlowBVT)|(Suite=Functional))&(Category!=Performance)&(Category!=Stress)]" + --minimum-expected-tests 1 + --hangdump --hangdump-timeout 10m + --crashdump --crashdump-type Full + --hangdump-type Full + --report-trx --report-trx-filename "test_results_${{ matrix.provider }}_${{ matrix.framework }}_{asm}_{tfm}_{arch}.trx" + --max-parallel-test-modules 1 env: ORLEANSSQSCONNECTIONSTRING: "Service=http://127.0.0.1:9324" ORLEANSDYNAMODBSERVICE: "http://127.0.0.1:8000" @@ -949,15 +949,15 @@ jobs: global-json-file: global.json - name: Test run: dotnet test - test/Extensions/Orleans.Streaming.NATS.Tests/Orleans.Streaming.NATS.Tests.csproj + --project test/Extensions/Orleans.Streaming.NATS.Tests/Orleans.Streaming.NATS.Tests.csproj --framework ${{ matrix.framework }} - --filter "Provider=${{ matrix.provider }}&(Suite=BVT|Suite=SlowBVT|Suite=Functional)&Category!=Performance&Category!=Stress" - --blame-hang-timeout 10m - --blame-crash-dump-type full - --blame-hang-dump-type full - --logger "trx;LogFileName=test_results_${{ matrix.provider }}_${{ matrix.framework }}.trx" - -- - -parallel none -noshadow + --filter-query "/[(Provider=${{ matrix.provider }})&((Suite=BVT)|(Suite=SlowBVT)|(Suite=Functional))&(Category!=Performance)&(Category!=Stress)]" + --minimum-expected-tests 1 + --hangdump --hangdump-timeout 10m + --crashdump --crashdump-type Full + --hangdump-type Full + --report-trx --report-trx-filename "test_results_${{ matrix.provider }}_${{ matrix.framework }}_{asm}_{tfm}_{arch}.trx" + --max-parallel-test-modules 1 - name: Clean up container if: always() run: docker rm -f nats || true @@ -1023,15 +1023,15 @@ jobs: global-json-file: global.json - name: Test run: dotnet test - test/Extensions/Orleans.Streaming.Kinesis.Tests/Orleans.Streaming.Kinesis.Tests.csproj + --project test/Extensions/Orleans.Streaming.Kinesis.Tests/Orleans.Streaming.Kinesis.Tests.csproj --framework ${{ matrix.framework }} - --filter "Provider=${{ matrix.provider }}&(Suite=BVT|Suite=SlowBVT|Suite=Functional)&Category!=Performance&Category!=Stress" - --blame-hang-timeout 10m - --blame-crash-dump-type full - --blame-hang-dump-type full - --logger "trx;LogFileName=test_results_${{ matrix.provider }}_${{ matrix.framework }}.trx" - -- - -parallel none -noshadow + --filter-query "/[(Provider=${{ matrix.provider }})&((Suite=BVT)|(Suite=SlowBVT)|(Suite=Functional))&(Category!=Performance)&(Category!=Stress)]" + --minimum-expected-tests 1 + --hangdump --hangdump-timeout 10m + --crashdump --crashdump-type Full + --hangdump-type Full + --report-trx --report-trx-filename "test_results_${{ matrix.provider }}_${{ matrix.framework }}_{asm}_{tfm}_{arch}.trx" + --max-parallel-test-modules 1 env: ORLEANSKINESISCONNECTIONSTRING: "http://localhost:4566;test;test;us-east-1" ORLEANSDYNAMODBSERVICE: "http://localhost:8000" @@ -1079,13 +1079,13 @@ jobs: - name: Test run: dotnet test --framework ${{ matrix.framework }} - --filter "Provider=None&Suite=${{ matrix.suite }}&Area!=CodeGen" - --blame-hang-timeout 10m - --blame-crash-dump-type full - --blame-hang-dump-type full - --logger "trx;LogFileName=test_results_${{ matrix.suite }}_${{ matrix.framework }}.trx" - -- - -parallel none -noshadow + --filter-query "/[(Provider=None)&(Suite=${{ matrix.suite }})&(Area!=CodeGen)]" + --minimum-expected-tests 1 + --hangdump --hangdump-timeout 10m + --crashdump --crashdump-type Full + --hangdump-type Full + --report-trx --report-trx-filename "test_results_${{ matrix.suite }}_${{ matrix.framework }}_{asm}_{tfm}_{arch}.trx" + --max-parallel-test-modules 1 - name: Archive Test Results if: always() continue-on-error: true @@ -1112,25 +1112,25 @@ jobs: global-json-file: global.json - name: Test Code Generator run: dotnet test - test/Orleans.CodeGenerator.Tests/Orleans.CodeGenerator.Tests.csproj + --project test/Orleans.CodeGenerator.Tests/Orleans.CodeGenerator.Tests.csproj --framework ${{ matrix.framework }} - --blame-hang-timeout 10m - --blame-crash-dump-type full - --blame-hang-dump-type full - --logger "trx;LogFileName=test_results_${{ matrix.framework }}.trx" - -- - -parallel none -noshadow + --minimum-expected-tests 1 + --hangdump --hangdump-timeout 10m + --crashdump --crashdump-type Full + --hangdump-type Full + --report-trx --report-trx-filename "test_results_${{ matrix.framework }}_{asm}_{tfm}_{arch}.trx" + --max-parallel-test-modules 1 && dotnet test - test/Orleans.DefaultCluster.Tests/Orleans.DefaultCluster.Tests.csproj + --project test/Orleans.DefaultCluster.Tests/Orleans.DefaultCluster.Tests.csproj --framework ${{ matrix.framework }} - --filter "Provider=None&Area=CodeGen&(Suite=BVT|Suite=SlowBVT|Suite=Functional)" - --blame-hang-timeout 10m - --blame-crash-dump-type full - --blame-hang-dump-type full - --logger "trx;LogFileName=test_results_defaultcluster_codegen_${{ matrix.framework }}.trx" - -- - -parallel none -noshadow + --filter-query "/[(Provider=None)&(Area=CodeGen)&((Suite=BVT)|(Suite=SlowBVT)|(Suite=Functional))]" + --minimum-expected-tests 1 + --hangdump --hangdump-timeout 10m + --crashdump --crashdump-type Full + --hangdump-type Full + --report-trx --report-trx-filename "test_results_defaultcluster_codegen_${{ matrix.framework }}_{asm}_{tfm}_{arch}.trx" + --max-parallel-test-modules 1 - name: Archive Test Results if: always() continue-on-error: true @@ -1202,13 +1202,13 @@ jobs: - name: Test run: dotnet test --framework ${{ matrix.framework }} - --filter "Provider=${{ matrix.provider }}&(Suite=BVT|Suite=SlowBVT|Suite=Functional)&Category!=Performance&Category!=Stress" - --blame-hang-timeout 10m - --blame-crash-dump-type full - --blame-hang-dump-type full - --logger "trx;LogFileName=test_results_${{ matrix.provider }}_${{ matrix.framework }}.trx" - -- - -parallel none -noshadow + --filter-query "/[(Provider=${{ matrix.provider }})&((Suite=BVT)|(Suite=SlowBVT)|(Suite=Functional))&(Category!=Performance)&(Category!=Stress)]" + --minimum-expected-tests 1 + --hangdump --hangdump-timeout 10m + --crashdump --crashdump-type Full + --hangdump-type Full + --report-trx --report-trx-filename "test_results_${{ matrix.provider }}_${{ matrix.framework }}_{asm}_{tfm}_{arch}.trx" + --max-parallel-test-modules 1 - name: Archive Test Results if: always() continue-on-error: true diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 2c0c67511d0..5c3477c660d 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -45,7 +45,7 @@ jobs: global-json-file: global.json - name: Test API data generator - run: dotnet test docs/tools/PackageJsonGenerator.Tests/PackageJsonGenerator.Tests.csproj + run: dotnet test --project docs/tools/PackageJsonGenerator.Tests/PackageJsonGenerator.Tests.csproj --minimum-expected-tests 1 - name: Setup Node.js uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # v5 @@ -105,7 +105,7 @@ jobs: ./samples/Validate-Samples.ps1 -NoBuild - name: Build and test documentation projects - run: dotnet test docs/Docs.slnx --configuration Release --framework net10.0 -p:BuildExternalAssets=false -bl:docs-projects.binlog --nologo -- -parallel none -noshadow + run: dotnet test --solution docs/Docs.slnx --configuration Release --framework net10.0 -p:BuildExternalAssets=false -bl:docs-projects.binlog --minimum-expected-tests 1 --max-parallel-test-modules 1 - name: Build samples against local Orleans packages shell: pwsh diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 0361731c530..1eef7ebff2a 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -25,14 +25,14 @@ The `Orleans.slnx` solution includes the source projects under `src` and the tes Run the full test suite for the current .NET target with: ```console -dotnet test Orleans.slnx --framework net10.0 -- -parallel none -noshadow +dotnet test --solution Orleans.slnx --framework net10.0 --minimum-expected-tests 1 --max-parallel-test-modules 1 ``` For a faster feedback loop, run a category or a single test. For example: ```console -dotnet test Orleans.slnx --framework net10.0 --filter "Category=BVT" -- -parallel none -noshadow -dotnet test test/Orleans.Core.Tests/Orleans.Core.Tests.csproj --framework net10.0 --filter "FullyQualifiedName~MyTestClass.MyTestMethod" -- -parallel none -noshadow +dotnet test --solution Orleans.slnx --framework net10.0 --filter-trait "Category=BVT" --minimum-expected-tests 1 --max-parallel-test-modules 1 +dotnet test --project test/Orleans.Core.Tests/Orleans.Core.Tests.csproj --framework net10.0 --filter-class "*MyTestClass*" --filter-method "*MyTestMethod*" --minimum-expected-tests 1 ``` ### Work on an application with local source diff --git a/Directory.Build.targets b/Directory.Build.targets index c0cbba7f573..19b6ea6087f 100644 --- a/Directory.Build.targets +++ b/Directory.Build.targets @@ -28,4 +28,12 @@ Condition=" '$(OrleansBuildTimeCodeGen)' == 'true' "/> + + + + diff --git a/Directory.Packages.props b/Directory.Packages.props index e64bb4ba914..26d43b7ad5f 100644 --- a/Directory.Packages.props +++ b/Directory.Packages.props @@ -27,7 +27,6 @@ - @@ -76,10 +75,14 @@ - + + + + + @@ -113,11 +116,10 @@ - - + - + diff --git a/Parallel-Tests.ps1 b/Parallel-Tests.ps1 index b016da59a0a..a5922b9db28 100644 --- a/Parallel-Tests.ps1 +++ b/Parallel-Tests.ps1 @@ -28,7 +28,7 @@ if ([string]::IsNullOrWhiteSpace($testFilter)) { } if ([string]::IsNullOrWhiteSpace($testFilter)) { - $testFilter = "Category=BVT|Category=SlowBVT"; + $testFilter = "/[(Category=BVT)|(Category=SlowBVT)]"; } Write-Host "Test filters: `"$testFilter`""; @@ -81,7 +81,7 @@ foreach ($d in $directories) if (-not $testFilter.EndsWith('"')) { $testFilter = "$testFilter`""; } $jobName = $([System.IO.Path]::GetFileName($d)) - $cmdLine = 'test --blame-hang-timeout 10m --no-build --configuration "' + $env:BuildConfiguration + '" --filter ' + $testFilter + ' --logger "trx" -- -parallel none -noshadow' + $cmdLine = 'test --no-build --configuration "' + $env:BuildConfiguration + '" --filter-query ' + $testFilter + ' --minimum-expected-tests 1 --report-trx --crashdump --crashdump-type Full --hangdump --hangdump-timeout 10m --hangdump-type Full' Write-Host $jobName dotnet $cmdLine Start-Job $ExecuteCmd -ArgumentList @($cmdLine, "$d") -Name $jobName | Out-Null Write-Host '' diff --git a/TestAll.cmd b/TestAll.cmd index 8f8dc0b1345..8e6bd2ce1b2 100644 --- a/TestAll.cmd +++ b/TestAll.cmd @@ -7,7 +7,7 @@ set CMDHOME=%CMDHOME:~0,-1% @REM Due to more of Windows .cmd script parameter passing quirks, we can't pass this value as cmdline argument, @REM so we need to pass it in through the back door as environment variable, scoped by setlocal -set TEST_FILTERS=Category=BVT^|Category=SlowBVT^|Category=Functional +set TEST_FILTERS=/[(Category=BVT)^|(Category=SlowBVT)^|(Category=Functional)] @REM Note: We transfer _complete_ control to the Test.cmd script here because we don't use CALL. diff --git a/docs/Docs.slnx b/docs/Docs.slnx index 520b732db4a..3a661ce8dcc 100644 --- a/docs/Docs.slnx +++ b/docs/Docs.slnx @@ -35,6 +35,7 @@ + diff --git a/docs/site/README.md b/docs/site/README.md index 2ade93e5c95..32c1208ceeb 100644 --- a/docs/site/README.md +++ b/docs/site/README.md @@ -79,7 +79,7 @@ may use a prerelease of `10.2.2` with the same property and a specific reason. T build and test the documentation projects locally, run: ```powershell -dotnet test ../Docs.slnx --configuration Release --framework net10.0 -p:BuildExternalAssets=false -- -parallel none -noshadow +dotnet test --solution ../Docs.slnx --configuration Release --framework net10.0 -p:BuildExternalAssets=false --minimum-expected-tests 1 --max-parallel-test-modules 1 ``` Build samples through `samples/Build-Samples.ps1`, which packs the current Orleans diff --git a/docs/site/src/content/docs/grains/snippets/testing/orleans-testing/Sample.OrleansTesting.MSTest/Sample.OrleansTesting.MSTest.csproj b/docs/site/src/content/docs/grains/snippets/testing/orleans-testing/Sample.OrleansTesting.MSTest/Sample.OrleansTesting.MSTest.csproj new file mode 100644 index 00000000000..524e0c8c19c --- /dev/null +++ b/docs/site/src/content/docs/grains/snippets/testing/orleans-testing/Sample.OrleansTesting.MSTest/Sample.OrleansTesting.MSTest.csproj @@ -0,0 +1,26 @@ + + + + false + true + false + true + Exe + net10.0 + + + + + + all + + + + + + + + + + + diff --git a/docs/site/src/content/docs/grains/snippets/testing/orleans-testing/Sample.OrleansTesting/Sample.OrleansTesting.csproj b/docs/site/src/content/docs/grains/snippets/testing/orleans-testing/Sample.OrleansTesting/Sample.OrleansTesting.csproj index a3ed91a1b90..4176025775a 100644 --- a/docs/site/src/content/docs/grains/snippets/testing/orleans-testing/Sample.OrleansTesting/Sample.OrleansTesting.csproj +++ b/docs/site/src/content/docs/grains/snippets/testing/orleans-testing/Sample.OrleansTesting/Sample.OrleansTesting.csproj @@ -3,28 +3,22 @@ false true + true Exe net10.0 + true - + - - all - - - - - runtime; build; native; contentfiles; analyzers; buildtransitive - all - - - runtime; build; native; contentfiles; analyzers; buildtransitive - all - + + + + + diff --git a/docs/site/src/content/docs/tutorials-and-samples/testing-walkthrough.md b/docs/site/src/content/docs/tutorials-and-samples/testing-walkthrough.md index 1a6ac0aae89..add573973e6 100644 --- a/docs/site/src/content/docs/tutorials-and-samples/testing-walkthrough.md +++ b/docs/site/src/content/docs/tutorials-and-samples/testing-walkthrough.md @@ -22,7 +22,7 @@ Clone the repository, then run the maintained test project: ```powershell git clone https://github.com/dotnet/orleans.git cd orleans -dotnet test .\docs\site\src\content\docs\grains\snippets\testing\orleans-testing\Sample.OrleansTesting\Sample.OrleansTesting.csproj +dotnet test --project .\docs\site\src\content\docs\grains\snippets\testing\orleans-testing\Sample.OrleansTesting\Sample.OrleansTesting.csproj --minimum-expected-tests 1 ``` The first test creates a cluster, deploys it, obtains a grain reference from the client, makes a call, and disposes the cluster: diff --git a/docs/site/src/content/docs/validate-snippets.ps1 b/docs/site/src/content/docs/validate-snippets.ps1 index 19d9145bd01..663d8e9c12f 100644 --- a/docs/site/src/content/docs/validate-snippets.ps1 +++ b/docs/site/src/content/docs/validate-snippets.ps1 @@ -421,11 +421,16 @@ function Invoke-ProjectValidation { $relativePath = [IO.Path]::GetRelativePath($validationRoot, $ProjectPath) $command = if ($IsTestProject) { "test" } else { "build" } + $arguments = if ($IsTestProject) { + @($command, "--project", $ProjectPath, "--minimum-expected-tests", "1") + } else { + @($command, $ProjectPath) + } $action = if ($IsTestProject) { "Testing" } else { "Building" } Write-Host "${action}: $relativePath" -ForegroundColor Yellow -NoNewline - $output = & dotnet $command $ProjectPath --framework net10.0 --nologo -v q 2>&1 + $output = & dotnet @arguments --framework net10.0 -v q 2>&1 $exitCode = $LASTEXITCODE if ($exitCode -eq 0) { @@ -466,8 +471,13 @@ if ($Parallel) { [xml] $projectXml = Get-Content -LiteralPath $ProjectPath -Raw $isTestProject = $projectXml.Project.PropertyGroup.IsTestProject -contains "true" $command = if ($isTestProject) { "test" } else { "build" } + $arguments = if ($isTestProject) { + @($command, "--project", $ProjectPath, "--minimum-expected-tests", "1") + } else { + @($command, $ProjectPath) + } - $output = & dotnet $command $ProjectPath --framework net10.0 --nologo -v q --artifacts-path $ArtifactsPath 2>&1 + $output = & dotnet @arguments --framework net10.0 -v q -p:ArtifactsPath=$ArtifactsPath 2>&1 $exitCode = $LASTEXITCODE @{ diff --git a/docs/tools/PackageJsonGenerator.Tests/PackageJsonGenerator.Tests.csproj b/docs/tools/PackageJsonGenerator.Tests/PackageJsonGenerator.Tests.csproj index be69670c68b..64cc0457a28 100644 --- a/docs/tools/PackageJsonGenerator.Tests/PackageJsonGenerator.Tests.csproj +++ b/docs/tools/PackageJsonGenerator.Tests/PackageJsonGenerator.Tests.csproj @@ -5,16 +5,14 @@ Exe false true + true false + true - - - - all - runtime; build; native; contentfiles; analyzers; buildtransitive - + + diff --git a/global.json b/global.json index b0a115c1190..513621e4e17 100644 --- a/global.json +++ b/global.json @@ -2,5 +2,8 @@ "sdk": { "rollForward": "major", "version": "10.0.400" + }, + "test": { + "runner": "Microsoft.Testing.Platform" } } diff --git a/test/Benchmarks/Benchmarks.csproj b/test/Benchmarks/Benchmarks.csproj index 6db20627e28..22a77b5f72d 100644 --- a/test/Benchmarks/Benchmarks.csproj +++ b/test/Benchmarks/Benchmarks.csproj @@ -37,9 +37,6 @@ - - - @@ -57,11 +54,4 @@ - - - all - runtime; build; native; contentfiles; analyzers; buildtransitive - - - diff --git a/test/Directory.Build.props b/test/Directory.Build.props index f878004aa40..b68bc9a18b7 100644 --- a/test/Directory.Build.props +++ b/test/Directory.Build.props @@ -17,7 +17,12 @@ net8.0;net10.0 - Exe + true + true + true + Exe + true + $(TestingPlatformCommandLineArguments) --ignore-exit-code 8 true - - + + + + + - diff --git a/test/Extensions/Orleans.AWS.Tests/Orleans.AWS.Tests.csproj b/test/Extensions/Orleans.AWS.Tests/Orleans.AWS.Tests.csproj index b018161df4d..9b19d8a3482 100644 --- a/test/Extensions/Orleans.AWS.Tests/Orleans.AWS.Tests.csproj +++ b/test/Extensions/Orleans.AWS.Tests/Orleans.AWS.Tests.csproj @@ -11,10 +11,6 @@ - - - - diff --git a/test/Extensions/Orleans.AdoNet.Tests/Orleans.AdoNet.Tests.csproj b/test/Extensions/Orleans.AdoNet.Tests/Orleans.AdoNet.Tests.csproj index 7443ed74123..08be5b0f495 100644 --- a/test/Extensions/Orleans.AdoNet.Tests/Orleans.AdoNet.Tests.csproj +++ b/test/Extensions/Orleans.AdoNet.Tests/Orleans.AdoNet.Tests.csproj @@ -18,12 +18,6 @@ - - - - all - runtime; build; native; contentfiles; analyzers; buildtransitive - diff --git a/test/Extensions/Orleans.Azure.Tests/Orleans.Azure.Tests.csproj b/test/Extensions/Orleans.Azure.Tests/Orleans.Azure.Tests.csproj index 0938e501c47..fc5ce2f6a92 100644 --- a/test/Extensions/Orleans.Azure.Tests/Orleans.Azure.Tests.csproj +++ b/test/Extensions/Orleans.Azure.Tests/Orleans.Azure.Tests.csproj @@ -13,7 +13,6 @@ - diff --git a/test/Extensions/Orleans.Clustering.Cassandra.Tests/Orleans.Clustering.Cassandra.Tests.csproj b/test/Extensions/Orleans.Clustering.Cassandra.Tests/Orleans.Clustering.Cassandra.Tests.csproj index a8da7918b29..bb531a336b7 100644 --- a/test/Extensions/Orleans.Clustering.Cassandra.Tests/Orleans.Clustering.Cassandra.Tests.csproj +++ b/test/Extensions/Orleans.Clustering.Cassandra.Tests/Orleans.Clustering.Cassandra.Tests.csproj @@ -7,7 +7,6 @@ - diff --git a/test/Extensions/Orleans.Clustering.Consul.Tests/Orleans.Clustering.Consul.Tests.csproj b/test/Extensions/Orleans.Clustering.Consul.Tests/Orleans.Clustering.Consul.Tests.csproj index 824a1ef8cb8..919838ce122 100644 --- a/test/Extensions/Orleans.Clustering.Consul.Tests/Orleans.Clustering.Consul.Tests.csproj +++ b/test/Extensions/Orleans.Clustering.Consul.Tests/Orleans.Clustering.Consul.Tests.csproj @@ -6,7 +6,6 @@ - diff --git a/test/Extensions/Orleans.Clustering.Firestore.Tests/Orleans.Clustering.Firestore.Tests.csproj b/test/Extensions/Orleans.Clustering.Firestore.Tests/Orleans.Clustering.Firestore.Tests.csproj index ef34547055b..5f4e9150cb2 100644 --- a/test/Extensions/Orleans.Clustering.Firestore.Tests/Orleans.Clustering.Firestore.Tests.csproj +++ b/test/Extensions/Orleans.Clustering.Firestore.Tests/Orleans.Clustering.Firestore.Tests.csproj @@ -6,7 +6,6 @@ - diff --git a/test/Extensions/Orleans.Clustering.ZooKeeper.Tests/Orleans.Clustering.ZooKeeper.Tests.csproj b/test/Extensions/Orleans.Clustering.ZooKeeper.Tests/Orleans.Clustering.ZooKeeper.Tests.csproj index a2cfafb46bb..74ae4ddd3cd 100644 --- a/test/Extensions/Orleans.Clustering.ZooKeeper.Tests/Orleans.Clustering.ZooKeeper.Tests.csproj +++ b/test/Extensions/Orleans.Clustering.ZooKeeper.Tests/Orleans.Clustering.ZooKeeper.Tests.csproj @@ -5,10 +5,6 @@ enable - - - - diff --git a/test/Extensions/Orleans.Cosmos.Tests/Orleans.Cosmos.Tests.csproj b/test/Extensions/Orleans.Cosmos.Tests/Orleans.Cosmos.Tests.csproj index dc29b5f3bed..c6e84ae5f9b 100644 --- a/test/Extensions/Orleans.Cosmos.Tests/Orleans.Cosmos.Tests.csproj +++ b/test/Extensions/Orleans.Cosmos.Tests/Orleans.Cosmos.Tests.csproj @@ -8,7 +8,6 @@ - diff --git a/test/Extensions/Orleans.DurableJobs.AzureStorage.Tests/Orleans.DurableJobs.AzureStorage.Tests.csproj b/test/Extensions/Orleans.DurableJobs.AzureStorage.Tests/Orleans.DurableJobs.AzureStorage.Tests.csproj index acc068c71cb..c5d4665125c 100644 --- a/test/Extensions/Orleans.DurableJobs.AzureStorage.Tests/Orleans.DurableJobs.AzureStorage.Tests.csproj +++ b/test/Extensions/Orleans.DurableJobs.AzureStorage.Tests/Orleans.DurableJobs.AzureStorage.Tests.csproj @@ -16,12 +16,6 @@ - - - - all - runtime; build; native; contentfiles; analyzers; buildtransitive - diff --git a/test/Extensions/Orleans.GrainDirectory.Firestore.Tests/Orleans.GrainDirectory.Firestore.Tests.csproj b/test/Extensions/Orleans.GrainDirectory.Firestore.Tests/Orleans.GrainDirectory.Firestore.Tests.csproj index b15880aa3f6..32d0ea0082b 100644 --- a/test/Extensions/Orleans.GrainDirectory.Firestore.Tests/Orleans.GrainDirectory.Firestore.Tests.csproj +++ b/test/Extensions/Orleans.GrainDirectory.Firestore.Tests/Orleans.GrainDirectory.Firestore.Tests.csproj @@ -5,10 +5,6 @@ enable - - - - diff --git a/test/Extensions/Orleans.Persistence.Firestore.Tests/Orleans.Persistence.Firestore.Tests.csproj b/test/Extensions/Orleans.Persistence.Firestore.Tests/Orleans.Persistence.Firestore.Tests.csproj index e40a369b2d9..b9fb71dc1f6 100644 --- a/test/Extensions/Orleans.Persistence.Firestore.Tests/Orleans.Persistence.Firestore.Tests.csproj +++ b/test/Extensions/Orleans.Persistence.Firestore.Tests/Orleans.Persistence.Firestore.Tests.csproj @@ -5,10 +5,6 @@ enable - - - - diff --git a/test/Extensions/Orleans.Redis.Tests/Orleans.Redis.Tests.csproj b/test/Extensions/Orleans.Redis.Tests/Orleans.Redis.Tests.csproj index 0d9ee152717..35a2d3fb646 100644 --- a/test/Extensions/Orleans.Redis.Tests/Orleans.Redis.Tests.csproj +++ b/test/Extensions/Orleans.Redis.Tests/Orleans.Redis.Tests.csproj @@ -8,7 +8,6 @@ - diff --git a/test/Extensions/Orleans.Reminders.Firestore.Tests/Orleans.Reminders.Firestore.Tests.csproj b/test/Extensions/Orleans.Reminders.Firestore.Tests/Orleans.Reminders.Firestore.Tests.csproj index 01b26d0a877..bfeb61de25e 100644 --- a/test/Extensions/Orleans.Reminders.Firestore.Tests/Orleans.Reminders.Firestore.Tests.csproj +++ b/test/Extensions/Orleans.Reminders.Firestore.Tests/Orleans.Reminders.Firestore.Tests.csproj @@ -5,10 +5,6 @@ enable - - - - diff --git a/test/Extensions/Orleans.Streaming.EventHubs.Tests/Orleans.Streaming.EventHubs.Tests.csproj b/test/Extensions/Orleans.Streaming.EventHubs.Tests/Orleans.Streaming.EventHubs.Tests.csproj index 7ebb85daf86..36f35055913 100644 --- a/test/Extensions/Orleans.Streaming.EventHubs.Tests/Orleans.Streaming.EventHubs.Tests.csproj +++ b/test/Extensions/Orleans.Streaming.EventHubs.Tests/Orleans.Streaming.EventHubs.Tests.csproj @@ -6,7 +6,6 @@ - diff --git a/test/Extensions/Orleans.Streaming.Kinesis.Tests/Orleans.Streaming.Kinesis.Tests.csproj b/test/Extensions/Orleans.Streaming.Kinesis.Tests/Orleans.Streaming.Kinesis.Tests.csproj index e57e6d8dbe1..583f6606ec9 100644 --- a/test/Extensions/Orleans.Streaming.Kinesis.Tests/Orleans.Streaming.Kinesis.Tests.csproj +++ b/test/Extensions/Orleans.Streaming.Kinesis.Tests/Orleans.Streaming.Kinesis.Tests.csproj @@ -6,7 +6,6 @@ - diff --git a/test/Extensions/Orleans.Streaming.NATS.Tests/Orleans.Streaming.NATS.Tests.csproj b/test/Extensions/Orleans.Streaming.NATS.Tests/Orleans.Streaming.NATS.Tests.csproj index 7976d56e611..36ccf34c176 100644 --- a/test/Extensions/Orleans.Streaming.NATS.Tests/Orleans.Streaming.NATS.Tests.csproj +++ b/test/Extensions/Orleans.Streaming.NATS.Tests/Orleans.Streaming.NATS.Tests.csproj @@ -5,10 +5,6 @@ enable - - - - diff --git a/test/Orleans.Analyzers.Tests/Orleans.Analyzers.Tests.csproj b/test/Orleans.Analyzers.Tests/Orleans.Analyzers.Tests.csproj index 56e2c0add02..a579fd4cc72 100644 --- a/test/Orleans.Analyzers.Tests/Orleans.Analyzers.Tests.csproj +++ b/test/Orleans.Analyzers.Tests/Orleans.Analyzers.Tests.csproj @@ -7,10 +7,7 @@ - - - diff --git a/test/Orleans.BroadcastChannel.Tests/Orleans.BroadcastChannel.Tests.csproj b/test/Orleans.BroadcastChannel.Tests/Orleans.BroadcastChannel.Tests.csproj index 71098a066cb..29808c81412 100644 --- a/test/Orleans.BroadcastChannel.Tests/Orleans.BroadcastChannel.Tests.csproj +++ b/test/Orleans.BroadcastChannel.Tests/Orleans.BroadcastChannel.Tests.csproj @@ -6,9 +6,6 @@ - - - diff --git a/test/Orleans.CodeGenerator.Tests/Orleans.CodeGenerator.Tests.csproj b/test/Orleans.CodeGenerator.Tests/Orleans.CodeGenerator.Tests.csproj index 34914216cff..23bb751f97c 100644 --- a/test/Orleans.CodeGenerator.Tests/Orleans.CodeGenerator.Tests.csproj +++ b/test/Orleans.CodeGenerator.Tests/Orleans.CodeGenerator.Tests.csproj @@ -13,9 +13,7 @@ - - - + diff --git a/test/Orleans.Connections.Security.Tests/Orleans.Connections.Security.Tests.csproj b/test/Orleans.Connections.Security.Tests/Orleans.Connections.Security.Tests.csproj index 9397fac4707..de77b729beb 100644 --- a/test/Orleans.Connections.Security.Tests/Orleans.Connections.Security.Tests.csproj +++ b/test/Orleans.Connections.Security.Tests/Orleans.Connections.Security.Tests.csproj @@ -7,9 +7,6 @@ - - - diff --git a/test/Orleans.Core.Tests/Directory/GrainLocatorResolverTests.cs b/test/Orleans.Core.Tests/Directory/GrainLocatorResolverTests.cs index fe4f8a6de42..ad543c0bf5c 100644 --- a/test/Orleans.Core.Tests/Directory/GrainLocatorResolverTests.cs +++ b/test/Orleans.Core.Tests/Directory/GrainLocatorResolverTests.cs @@ -6,7 +6,6 @@ using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Hosting; using Microsoft.Extensions.Logging; -using Microsoft.VisualStudio.TestPlatform.Utilities; using NSubstitute; using Orleans.GrainDirectory; using Orleans.Hosting; diff --git a/test/Orleans.Core.Tests/Orleans.Core.Tests.csproj b/test/Orleans.Core.Tests/Orleans.Core.Tests.csproj index 97190281383..01a7c4ab607 100644 --- a/test/Orleans.Core.Tests/Orleans.Core.Tests.csproj +++ b/test/Orleans.Core.Tests/Orleans.Core.Tests.csproj @@ -16,7 +16,6 @@ - all diff --git a/test/Orleans.Dashboard.Tests/Orleans.Dashboard.UnitTests/Orleans.Dashboard.UnitTests.csproj b/test/Orleans.Dashboard.Tests/Orleans.Dashboard.UnitTests/Orleans.Dashboard.UnitTests.csproj index e9f169feed4..6fb314738f2 100644 --- a/test/Orleans.Dashboard.Tests/Orleans.Dashboard.UnitTests/Orleans.Dashboard.UnitTests.csproj +++ b/test/Orleans.Dashboard.Tests/Orleans.Dashboard.UnitTests/Orleans.Dashboard.UnitTests.csproj @@ -7,12 +7,6 @@ - - - - all - runtime; build; native; contentfiles; analyzers - diff --git a/test/Orleans.DefaultCluster.Tests/Orleans.DefaultCluster.Tests.csproj b/test/Orleans.DefaultCluster.Tests/Orleans.DefaultCluster.Tests.csproj index 3e2f815e9c4..55c16a58d56 100644 --- a/test/Orleans.DefaultCluster.Tests/Orleans.DefaultCluster.Tests.csproj +++ b/test/Orleans.DefaultCluster.Tests/Orleans.DefaultCluster.Tests.csproj @@ -8,7 +8,6 @@ - diff --git a/test/Orleans.DependencyInjection.Tests/Orleans.DependencyInjection.Tests.csproj b/test/Orleans.DependencyInjection.Tests/Orleans.DependencyInjection.Tests.csproj index 699ee26acb8..e8b8a8846c6 100644 --- a/test/Orleans.DependencyInjection.Tests/Orleans.DependencyInjection.Tests.csproj +++ b/test/Orleans.DependencyInjection.Tests/Orleans.DependencyInjection.Tests.csproj @@ -8,9 +8,6 @@ - - - diff --git a/test/Orleans.DurableJobs.Tests/Orleans.DurableJobs.Tests.csproj b/test/Orleans.DurableJobs.Tests/Orleans.DurableJobs.Tests.csproj index 779e1c7a89a..048d751339e 100644 --- a/test/Orleans.DurableJobs.Tests/Orleans.DurableJobs.Tests.csproj +++ b/test/Orleans.DurableJobs.Tests/Orleans.DurableJobs.Tests.csproj @@ -7,12 +7,6 @@ - - - all - runtime; build; native; contentfiles; analyzers; buildtransitive - - diff --git a/test/Orleans.EventSourcing.Tests/Orleans.EventSourcing.Tests.csproj b/test/Orleans.EventSourcing.Tests/Orleans.EventSourcing.Tests.csproj index be39979fd85..b01c22bb705 100644 --- a/test/Orleans.EventSourcing.Tests/Orleans.EventSourcing.Tests.csproj +++ b/test/Orleans.EventSourcing.Tests/Orleans.EventSourcing.Tests.csproj @@ -5,10 +5,6 @@ $(TestTargetFrameworks) - - - - diff --git a/test/Orleans.GrainDirectory.Tests/Orleans.GrainDirectory.Tests.csproj b/test/Orleans.GrainDirectory.Tests/Orleans.GrainDirectory.Tests.csproj index e63c625218e..341fc175082 100644 --- a/test/Orleans.GrainDirectory.Tests/Orleans.GrainDirectory.Tests.csproj +++ b/test/Orleans.GrainDirectory.Tests/Orleans.GrainDirectory.Tests.csproj @@ -7,7 +7,6 @@ - diff --git a/test/Orleans.Journaling.Json.Tests/Orleans.Journaling.Json.Tests.csproj b/test/Orleans.Journaling.Json.Tests/Orleans.Journaling.Json.Tests.csproj index 1285a25c181..2edd598cbe4 100644 --- a/test/Orleans.Journaling.Json.Tests/Orleans.Journaling.Json.Tests.csproj +++ b/test/Orleans.Journaling.Json.Tests/Orleans.Journaling.Json.Tests.csproj @@ -11,9 +11,6 @@ - - - diff --git a/test/Orleans.Journaling.Tests/Orleans.Journaling.Tests.csproj b/test/Orleans.Journaling.Tests/Orleans.Journaling.Tests.csproj index d5c17dbeb75..5ba2f9fe3f8 100644 --- a/test/Orleans.Journaling.Tests/Orleans.Journaling.Tests.csproj +++ b/test/Orleans.Journaling.Tests/Orleans.Journaling.Tests.csproj @@ -12,9 +12,6 @@ - - - diff --git a/test/Orleans.Persistence.TestKit.Tests/Orleans.Persistence.TestKit.Tests.csproj b/test/Orleans.Persistence.TestKit.Tests/Orleans.Persistence.TestKit.Tests.csproj index b392e770b1d..61e5c47400e 100644 --- a/test/Orleans.Persistence.TestKit.Tests/Orleans.Persistence.TestKit.Tests.csproj +++ b/test/Orleans.Persistence.TestKit.Tests/Orleans.Persistence.TestKit.Tests.csproj @@ -7,9 +7,6 @@ - - - diff --git a/test/Orleans.Placement.Tests/Orleans.Placement.Tests.csproj b/test/Orleans.Placement.Tests/Orleans.Placement.Tests.csproj index ef11d6e4614..50027b210c5 100644 --- a/test/Orleans.Placement.Tests/Orleans.Placement.Tests.csproj +++ b/test/Orleans.Placement.Tests/Orleans.Placement.Tests.csproj @@ -7,7 +7,6 @@ - diff --git a/test/Orleans.Reminders.Tests/Orleans.Reminders.Tests.csproj b/test/Orleans.Reminders.Tests/Orleans.Reminders.Tests.csproj index 7c1e02f89b4..58512674afe 100644 --- a/test/Orleans.Reminders.Tests/Orleans.Reminders.Tests.csproj +++ b/test/Orleans.Reminders.Tests/Orleans.Reminders.Tests.csproj @@ -7,12 +7,6 @@ - - - - all - runtime; build; native; contentfiles; analyzers; buildtransitive - diff --git a/test/Orleans.Runtime.Internal.Tests/Orleans.Runtime.Internal.Tests.csproj b/test/Orleans.Runtime.Internal.Tests/Orleans.Runtime.Internal.Tests.csproj index 2c005a360bb..3a213e289e8 100644 --- a/test/Orleans.Runtime.Internal.Tests/Orleans.Runtime.Internal.Tests.csproj +++ b/test/Orleans.Runtime.Internal.Tests/Orleans.Runtime.Internal.Tests.csproj @@ -7,7 +7,6 @@ - diff --git a/test/Orleans.Runtime.Tests/Orleans.Runtime.Tests.csproj b/test/Orleans.Runtime.Tests/Orleans.Runtime.Tests.csproj index 553f8912e35..caeae295405 100644 --- a/test/Orleans.Runtime.Tests/Orleans.Runtime.Tests.csproj +++ b/test/Orleans.Runtime.Tests/Orleans.Runtime.Tests.csproj @@ -10,12 +10,6 @@ - - - all - runtime; build; native; contentfiles; analyzers; buildtransitive - - diff --git a/test/Orleans.Serialization.FSharp.Tests/Orleans.Serialization.FSharp.Tests.fsproj b/test/Orleans.Serialization.FSharp.Tests/Orleans.Serialization.FSharp.Tests.fsproj index 38b87e8bd3e..fe4949e13dc 100644 --- a/test/Orleans.Serialization.FSharp.Tests/Orleans.Serialization.FSharp.Tests.fsproj +++ b/test/Orleans.Serialization.FSharp.Tests/Orleans.Serialization.FSharp.Tests.fsproj @@ -5,17 +5,14 @@ - - - - + - - - - + + + + diff --git a/test/Orleans.Serialization.UnitTests/Orleans.Serialization.UnitTests.csproj b/test/Orleans.Serialization.UnitTests/Orleans.Serialization.UnitTests.csproj index a79ce2616b1..a210f5a211b 100644 --- a/test/Orleans.Serialization.UnitTests/Orleans.Serialization.UnitTests.csproj +++ b/test/Orleans.Serialization.UnitTests/Orleans.Serialization.UnitTests.csproj @@ -12,11 +12,7 @@ - - - - diff --git a/test/Orleans.Streaming.Tests/Orleans.Streaming.Tests.csproj b/test/Orleans.Streaming.Tests/Orleans.Streaming.Tests.csproj index 7add9fc013e..0febc119cdd 100644 --- a/test/Orleans.Streaming.Tests/Orleans.Streaming.Tests.csproj +++ b/test/Orleans.Streaming.Tests/Orleans.Streaming.Tests.csproj @@ -8,7 +8,6 @@ - all diff --git a/test/TestInfrastructure/Orleans.TestingHost.Tests/Orleans.TestingHost.Tests.csproj b/test/TestInfrastructure/Orleans.TestingHost.Tests/Orleans.TestingHost.Tests.csproj index 5792ae9582f..67b3b042044 100644 --- a/test/TestInfrastructure/Orleans.TestingHost.Tests/Orleans.TestingHost.Tests.csproj +++ b/test/TestInfrastructure/Orleans.TestingHost.Tests/Orleans.TestingHost.Tests.csproj @@ -7,12 +7,6 @@ - - - all - runtime; build; native; contentfiles; analyzers; buildtransitive - - diff --git a/test/Transactions/Orleans.Transactions.Azure.Test/Orleans.Transactions.Azure.Test.csproj b/test/Transactions/Orleans.Transactions.Azure.Test/Orleans.Transactions.Azure.Test.csproj index c797ca82f76..1b8369bf45d 100644 --- a/test/Transactions/Orleans.Transactions.Azure.Test/Orleans.Transactions.Azure.Test.csproj +++ b/test/Transactions/Orleans.Transactions.Azure.Test/Orleans.Transactions.Azure.Test.csproj @@ -7,10 +7,6 @@ true - - - - diff --git a/test/Transactions/Orleans.Transactions.DynamoDB.Test/Orleans.Transactions.DynamoDB.Test.csproj b/test/Transactions/Orleans.Transactions.DynamoDB.Test/Orleans.Transactions.DynamoDB.Test.csproj index b84ca7467f7..fb691258a44 100644 --- a/test/Transactions/Orleans.Transactions.DynamoDB.Test/Orleans.Transactions.DynamoDB.Test.csproj +++ b/test/Transactions/Orleans.Transactions.DynamoDB.Test/Orleans.Transactions.DynamoDB.Test.csproj @@ -6,10 +6,6 @@ true - - - - diff --git a/test/Transactions/Orleans.Transactions.Tests/Orleans.Transactions.Tests.csproj b/test/Transactions/Orleans.Transactions.Tests/Orleans.Transactions.Tests.csproj index 4e27149fe3e..d00199af730 100644 --- a/test/Transactions/Orleans.Transactions.Tests/Orleans.Transactions.Tests.csproj +++ b/test/Transactions/Orleans.Transactions.Tests/Orleans.Transactions.Tests.csproj @@ -6,12 +6,6 @@ - - - all - runtime; build; native; contentfiles; analyzers; buildtransitive - - diff --git a/test/testconfig.json b/test/testconfig.json new file mode 100644 index 00000000000..cefd160b488 --- /dev/null +++ b/test/testconfig.json @@ -0,0 +1,10 @@ +{ + "$schema": "https://xunit.net/schema/current/testconfig.schema.json", + "xUnit": { + "diagnosticMessages": true, + "longRunningTestSeconds": 120, + "methodDisplay": "classAndMethod", + "parallelizeTestCollections": false, + "preEnumerateTheories": true + } +} diff --git a/test/xunit.runner.json b/test/xunit.runner.json deleted file mode 100644 index d08a5e8af0a..00000000000 --- a/test/xunit.runner.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "$schema": "https://xunit.net/schema/current/xunit.runner.schema.json", - "appDomain": "denied", - "diagnosticMessages": true, - "parallelizeAssembly": false, - "parallelizeTestCollections": false, - "methodDisplay": "classAndMethod", - "shadowCopy": false, - "preEnumerateTheories": true, - "longRunningTestSeconds": 120 -}