fix(test): propagate xUnit cancellation - #10845
Merged
ReubenBond merged 19 commits intoAug 27, 2026
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR improves cooperative cancellation across the Orleans test ecosystem by removing the global suppression of xUnit1051 and systematically threading TestContext.Current.CancellationToken into long-running waits, cluster lifecycle operations, and provider/test-kit helpers so canceled or timed-out test runs terminate promptly.
Changes:
- Removes the test-wide
xUnit1051suppression and updates tests/helpers to passTestContext.Current.CancellationToken(and to link/timeout tokens where appropriate). - Introduces/extends cancellation-aware overloads in test infrastructure (eg, TestingHost and test-kit utilities) to propagate cancellation into the actual work being performed.
- Updates many test suites (streaming, transactions, reminders, placement, storage providers, distributed tests, codegen tests, etc) to use cancellation-aware
WaitAsync,Delay, and async I/O APIs.
Show a summary per file
| File | Description |
|---|---|
| test/Transactions/Orleans.Transactions.Tests/TransactionRecoveryFailureObservationTests.cs | Passes test cancellation token into recovery observation waits and watchdogs. |
| test/Transactions/Orleans.Transactions.Tests/TransactionDiagnosticEventsTests.cs | Adds cancellation to phase gate waits. |
| test/Transactions/Orleans.Transactions.DynamoDB.Test/DynamoDBTransactionalStateStorageTests.cs | Threads test cancellation into AWS SDK calls. |
| test/TestInfrastructure/TestExtensions/TestClusterPerTest.cs | Propagates cancellation into cluster deploy/stop lifecycle. |
| test/TestInfrastructure/TestExtensions/DefaultClusterFixture.cs | Propagates cancellation into cluster deploy/stop lifecycle. |
| test/TestInfrastructure/TestExtensions/BaseInProcessTestClusterFixture.cs | Propagates cancellation into cluster deploy/stop lifecycle. |
| test/TestInfrastructure/TestExtensions/BaseClusterFixture.cs | Propagates cancellation into cluster deploy/stop lifecycle. |
| test/TestInfrastructure/Orleans.TestingHost.Tests/InProcessTestClusterDirectoryTests.cs | Uses cancellation-aware DeployAsync. |
| test/TestInfrastructure/Orleans.TestingHost.Tests/HostShutdownCallbackTests.cs | Adds cancellation to cluster operations and grain wait helpers. |
| test/TestInfrastructure/Orleans.TestingHost.Tests/Grains/BlockingCallGrains.cs | Adds cancellation-aware overload for test grain wait helper. |
| test/TestInfrastructure/Orleans.TestingHost.Tests/ClientLifecycleTests.cs | Uses cancellation-aware DeployAsync/StopClusterClientAsync in tests. |
| test/TesterInternal/ActivationsLifeCycleTests/ActivationCancellationTests.cs | Adds cancellation to activation waits and delays. |
| test/Orleans.Testing.Reminders/ReminderTestClock.cs | Requires explicit cancellation token for reminder test clock operations. |
| test/Orleans.Streaming.Tests/StreamingTests/SystemTargetRouteTests.cs | Adds cancellation propagation and bounded cleanup for streaming producer control. |
| test/Orleans.Streaming.Tests/StreamingTests/StreamProvidersTests.cs | Formatting-only change to thrown assertion call layout. |
| test/Orleans.Streaming.Tests/StreamingTests/StreamingResumeTests.cs | Adds cancellation to polling/wait helpers. |
| test/Orleans.Streaming.Tests/StreamingTests/StreamingCacheMissTests.cs | Links test cancellation into timeout CTS and delays; passes cancellation to grain calls. |
| test/Orleans.Streaming.Tests/StreamingTests/StreamGeneratorProviderTests.cs | Adds cancellation to wait-until loops. |
| test/Orleans.Streaming.Tests/StreamingTests/StatelessWorkersStreamTests.cs | Formatting-only change to consuming stop cleanup layout. |
| test/Orleans.Streaming.Tests/StreamingTests/PlugableQueueBalancerTests/PluggableQueueBalancerTestsWithMemoryStreamProvider.cs | Propagates cancellation into base test runner call. |
| test/Orleans.Streaming.Tests/StreamingTests/PlugableQueueBalancerTests/PluggableQueueBalancerTestBase.cs | Adds optional cancellation token to base test runner and passes it to wait loops. |
| test/Orleans.Streaming.Tests/StreamingTests/MultipleStreamsTestRunner.cs | Adds optional cancellation token and threads it through runner operations. |
| test/Orleans.Streaming.Tests/StreamingTests/MemorySubscriptionMultiplicityTests.cs | Passes test cancellation token into runner calls. |
| test/Orleans.Streaming.Tests/StreamingTests/MemoryStreamResumeTests.cs | Links test cancellation into timeout CTS. |
| test/Orleans.Streaming.Tests/StreamingTests/MemoryStreamProviderClientTests.cs | Passes test cancellation token into runner calls. |
| test/Orleans.Streaming.Tests/StreamingTests/MemoryStreamProviderBatchedClientTests.cs | Passes test cancellation token into runner calls. |
| test/Orleans.Streaming.Tests/StreamingTests/ImplicitSubscriptionKeyTypeGrainTests.cs | Adds cancellation to wait-until loop. |
| test/Orleans.Streaming.Tests/StreamingTests/GeneratedStreamRecoveryTests.cs | Adds cancellation parameter threading into event generation and recovery tests. |
| test/Orleans.Streaming.Tests/StreamingTests/ControllableStreamGeneratorProviderTests.cs | Adds cancellation-aware wait loops and bounded cleanup/reset. |
| test/Orleans.Streaming.Tests/OrleansRuntime/Streams/LeaseBasedQueueBalancerTests.cs | Adds cancellation to channel async enumeration and waits. |
| test/Orleans.Streaming.Tests/Checkpointers/StreamQueueCheckpointerTests.cs | Makes test sync-context runner cancellation-aware. |
| test/Orleans.Serialization.UnitTests/ManualVersionToleranceTests.cs | Adds cancellation to pipelines flushes. |
| test/Orleans.Runtime.Tests/MembershipTests/SilosStopTests.cs | Adds cancellation to cluster kill operation. |
| test/Orleans.Runtime.Tests/InsideRuntimeClientTests.cs | Uses cancellation-aware DeployAsync. |
| test/Orleans.Runtime.Tests/Forwarding/ShutdownSiloTests.cs | Adds cancellation to silo stop operations. |
| test/Orleans.Runtime.Tests/Directories/MultipleGrainDirectoriesTests.cs | Adds cancellation to stopping secondary silos. |
| test/Orleans.Runtime.Tests/ClientConnectionTests/StallConnectionTests.cs | Adds cancellation to client initialization. |
| test/Orleans.Runtime.Tests/ClientConnectionTests/GatewayConnectionTests.cs | Adds cancellation to stopping cluster client. |
| test/Orleans.Runtime.Tests/ClientConnectionTests/ClientConnectionRegisteredServiceEventTests.cs | Adds cancellation to stop operations on cluster/silos. |
| test/Orleans.Runtime.Tests/ClientConnectionTests/ClientConnectionEventTests.cs | Adds cancellation to DeployAsync/StopAllSilosAsync/StopSiloAsync. |
| test/Orleans.Runtime.Internal.Tests/TimeoutTests.cs | Adds cancellation to waits/delays and preserves test cancellation behavior. |
| test/Orleans.Runtime.Internal.Tests/TestRunners/GrainPersistenceTestRunner.cs | Adds cancellation to re-initialize client after restart. |
| test/Orleans.Runtime.Internal.Tests/SiloMetadataTests/SiloMetadataTests.cs | Adds cancellation to silo stop call. |
| test/Orleans.Runtime.Internal.Tests/RemindersTest/ReminderTableTestsBase.cs | Passes cancellation into model-based test runner. |
| test/Orleans.Runtime.Internal.Tests/Manifest/ClusterManifestStabilizationTests.cs | Uses cancellation-aware DeployAsync. |
| test/Orleans.Runtime.Internal.Tests/GrainLocatorActivationResiliencyTests.cs | Adds cancellation to directory registration calls. |
| test/Orleans.Runtime.Internal.Tests/ActivationsLifeCycleTests/ActivationDataMigrationTests.cs | Adds cancellation to activation operations and waits. |
| test/Orleans.Reminders.Tests/TimerTests/ControllableReminderTable.cs | Makes reminder table read gating cancellation-aware. |
| test/Orleans.Reminders.Tests/MinimalReminderTests.cs | Uses bounded cleanup cancellation and links test cancellation into init CTS. |
| test/Orleans.Placement.Tests/PlacementFilterTests/GrainPlacementFilterTests.cs | Adds cancellation to Task.Run and wait. |
| test/Orleans.Placement.Tests/General/GrainPlacementClusterChangeTests.cs | Adds cancellation to StopSiloAsync call. |
| test/Orleans.Placement.Tests/General/ElasticPlacementTest.cs | Adds cancellation to start/stop additional silos. |
| test/Orleans.Placement.Tests/ActivationRepartitioningTests/ActivationRepartitionerMigrationTests.cs | Adds cancellation to timeout waits. |
| test/Orleans.Placement.Tests/ActivationRebalancingTests/StaticRebalancingTests.cs | Adds cancellation to periodic delay. |
| test/Orleans.Placement.Tests/ActivationRebalancingTests/StatePreservationRebalancingTests.cs | Adds cancellation to StopSiloAsync call. |
| test/Orleans.Placement.Tests/ActivationRebalancingTests/DynamicRebalancingTests.cs | Adds cancellation to periodic delay. |
| test/Orleans.Journaling.Tests/UpstreamMainCompatibilityTests.cs | Adds cancellation to storage append. |
| test/Orleans.Journaling.Tests/FormatMigrationClusterTests.cs | Adds cancellation to cluster lifecycle and bounded cleanup. |
| test/Orleans.Journaling.Tests/DurableValueTests.cs | Adds cancellation to lifecycle startup. |
| test/Orleans.Journaling.Tests/DurableStateAndTcsRecoveryTests.cs | Adds cancellation to lifecycle startup. |
| test/Orleans.Journaling.Tests/AzureTableJournalStorageOptionsTests.cs | Adds cancellation to Azure client call. |
| test/Orleans.GrainDirectory.Tests/GrainDirectory/GrainDirectoryOptionsTests.cs | Uses cancellation-aware DeployAsync. |
| test/Orleans.GrainDirectory.Tests/GrainDirectory/DistributedGrainDirectoryTests.cs | Links test cancellation into timeout CTS and bounded disposal. |
| test/Orleans.DurableJobs.Tests/DurableJobs/JournaledJobShardStateTests.cs | Adds cancellation to async enumeration via WithCancellation. |
| test/Orleans.DurableJobs.Tests/DurableJobs/IJobShardManagerTestFixture.cs | Adds cancellation to test fixture scope creation. |
| test/Orleans.DefaultCluster.Tests/MultifacetGrainTest.cs | Adds cancellation to wait. |
| test/Orleans.DefaultCluster.Tests/Migration/MigrationTests.cs | Links test cancellation into CTS and propagates cancellation through waits/delays. |
| test/Orleans.DefaultCluster.Tests/LifecycleObserverCreationTests.cs | Uses cancellation-aware DeployAsync. |
| test/Orleans.DefaultCluster.Tests/GenericGrainTests.cs | Adds cancellation to blocking waits and wait-until loops. |
| test/Orleans.DefaultCluster.Tests/ErrorGrainTest.cs | Adds cancellation to waits and retries. |
| test/Orleans.DefaultCluster.Tests/DurableJobsTracingTests.cs | Links test cancellation into CTS and uses cancellation-aware delays. |
| test/Orleans.Core.Tests/Utils/TimeProviderExtensionsTests.cs | Passes test cancellation token into TimeProvider delays. |
| test/Orleans.Core.Tests/Storage/StateStorageBridgeConcurrencyTests.cs | Links test cancellation into CTS and adds cancellation-aware scheduling/waits. |
| test/Orleans.Core.Tests/Serialization/MessageSerializerTests.cs | Adds cancellation to delays. |
| test/Orleans.Core.Tests/Runtime/ActivationCollectorTests.cs | Links test cancellation into CTS and Task.Run cancellation. |
| test/Orleans.Core.Tests/OrleansRuntime/AsyncSerialExecutorTests.cs | Adds cancellation token to Task.Run. |
| test/Orleans.Core.Tests/ObserverManagerTests.cs | Adds cancellation to Task.Run and waits. |
| test/Orleans.Core.Tests/Networking/ConnectionFrameHelperTests.cs | Adds cancellation to flush and wait operations. |
| test/Orleans.Core.Tests/Manifest/ClusterManifestProviderTests.cs | Adds cancellation to lifecycle stop and waits. |
| test/Orleans.Core.Tests/General/TimeProviderExtensionsTests.cs | Adds cancellation to delay and wait operations. |
| test/Orleans.Core.Tests/General/RequestContextTestsNonSiloRequired.cs | Adds cancellation to blocking waits and Task.Run/delays. |
| test/Orleans.Core.Tests/DurableJobs/DurableJobReceiverExtensionTests.cs | Links test cancellation into CTS and adds cancellation to waits. |
| test/Orleans.Core.Tests/Diagnostics/DiagnosticInfrastructureRegressionTests.cs | Adds cancellation to event wait helpers. |
| test/Orleans.Core.Tests/Caching/ConcurrentLruTests.cs | Adds cancellation to wait. |
| test/Orleans.Core.Tests/Caching/ConcurrentLruSoakTests.cs | Links test cancellation into CTS and Task.Run cancellation. |
| test/Orleans.Connections.Security.Tests/TlsConnectionTests.cs | Adds cancellation to DeployAsync and shutdown sequence. |
| test/Orleans.CodeGenerator.Tests/TestCompilationHelper.cs | Adds cancellation checks and passes token into Roslyn parse. |
| test/Orleans.CodeGenerator.Tests/ReferencedAssemblyDiagnosticParityTests.cs | Adds cancellation token to generator run. |
| test/Orleans.CodeGenerator.Tests/PartialDeclarationDeduplicationTests.cs | Adds cancellation to diagnostics retrieval. |
| test/Orleans.CodeGenerator.Tests/ModelExtractorTests.cs | Propagates cancellation into model extraction. |
| test/Orleans.CodeGenerator.Tests/IncrementalCachingTests.cs | Adds cancellation to Roslyn parse calls. |
| test/Orleans.CodeGenerator.Tests/GeneratedWarningSuppressionTests.cs | Adds cancellation to diagnostics retrieval. |
| test/Orleans.CodeGenerator.Tests/DiagnosticTests.cs | Adds cancellation to syntax root and diagnostics retrieval. |
| test/Orleans.CodeGenerator.Tests/CustomReturnTypeTests.cs | Adds cancellation to Roslyn text retrieval/parse and model extraction. |
| test/Grains/TestGrains/GeneratedEventReporterGrain.cs | Makes reset cancellation-aware. |
| test/Grains/TestGrainInterfaces/ISampleStreamingGrain.cs | Adds cancellation to streaming producer/consumer grain interfaces. |
| test/Grains/TestGrainInterfaces/IGeneratedEventReporterGrain.cs | Adds cancellation to reporter reset interface. |
| test/Extensions/Orleans.Streaming.NATS.Tests/NatsTestConstants.cs | Adds cancellation to availability checks and uses publication-only Lazy mode. |
| test/Extensions/Orleans.Streaming.NATS.Tests/NatsSubscriptionMultiplicityTests.cs | Passes cancellation to runner calls. |
| test/Extensions/Orleans.Streaming.NATS.Tests/NatsClientStreamTests.cs | Passes cancellation to runner calls. |
| test/Extensions/Orleans.Streaming.Kinesis.Tests/KinesisClientStreamTests.cs | Adds cancellation to stream resource create/delete and runner calls. |
| test/Extensions/Orleans.Streaming.Kinesis.Tests/KinesisAdapterTests.cs | Adds cancellation to adapter operations and receiver reads. |
| test/Extensions/Orleans.Streaming.EventHubs.Tests/Streaming/EHSubscriptionMultiplicityTests.cs | Passes cancellation to runner calls. |
| test/Extensions/Orleans.Streaming.EventHubs.Tests/Streaming/EHStreamProviderCheckpointTests.cs | Adds cancellation to runner calls and reporter reset. |
| test/Extensions/Orleans.Streaming.EventHubs.Tests/Streaming/EHStreamPerPartitionTests.cs | Adds cancellation to consumer setup and wait-until loops. |
| test/Extensions/Orleans.Streaming.EventHubs.Tests/Streaming/EHClientStreamTests.cs | Passes cancellation to runner calls. |
| test/Extensions/Orleans.Streaming.EventHubs.Tests/Streaming/EHBatchedSubscriptionMultiplicityTests.cs | Passes cancellation to runner calls. |
| test/Extensions/Orleans.Streaming.EventHubs.Tests/StatisticMonitorTests/EHStatisticMonitorTests.cs | Adds cancellation to setup and wait-until loops. |
| test/Extensions/Orleans.Streaming.EventHubs.Tests/PluggableQueueBalancerTests.cs | Propagates cancellation into base test runner call. |
| test/Extensions/Orleans.Streaming.EventHubs.Tests/EventHubsAspireIntegrationTests.cs | Adds cancellation to app model build. |
| test/Extensions/Orleans.Streaming.EventHubs.Tests/CollectionFixtures.cs | Links test cancellation into timeout CTS. |
| test/Extensions/Orleans.Redis.Tests/Utility/CommonFixture.cs | Adds cancellation to redis connection/startup and improves disposal-on-failure. |
| test/Extensions/Orleans.Redis.Tests/Streaming/RedisSubscriptionMultiplicityTests.cs | Passes cancellation to runner calls. |
| test/Extensions/Orleans.Redis.Tests/Streaming/RedisClientStreamTests.cs | Passes cancellation to runner calls. |
| test/Extensions/Orleans.Redis.Tests/RedisMultiplexerOwnershipTests.cs | Adds cancellation to lifecycle start. |
| test/Extensions/Orleans.Redis.Tests/Persistence/RedisStorageTests.cs | Passes cancellation into storage provider creation and conformance runner. |
| test/Extensions/Orleans.Redis.Tests/Persistence/RedisStorageTests_OrleansSerializer.cs | Passes cancellation into storage provider creation. |
| test/Extensions/Orleans.Redis.Tests/Persistence/RedisStorageTests_DeleteStateOnClear.cs | Passes cancellation into storage provider creation and conformance runner. |
| test/Extensions/Orleans.Persistence.Firestore.Tests/FirestoreStorageProviderTests.cs | Adds cancellation to model-based conformance runner. |
| test/Extensions/Orleans.DurableJobs.AzureStorage.Tests/DurableJobs/AzureBlobJournaledJobShardManagerTests.cs | Adds cancellation to fixture creation and bounded cleanup semantics. |
| test/Extensions/Orleans.Cosmos.Tests/PersistenceProviderTests_Cosmos.cs | Adds cancellation to model-based conformance runner. |
| test/Extensions/Orleans.Cosmos.Tests/FeedIteratorExtensionsTests.cs | Passes cancellation token into iterator drain helper. |
| test/Extensions/Orleans.Clustering.ZooKeeper.Tests/ZookeeperTestUtils.cs | Adds cancellation to ensure check and uses publication-only Lazy mode. |
| test/Extensions/Orleans.Clustering.ZooKeeper.Tests/ZookeeperMembershipTableTests.cs | Passes cancellation into ZooKeeper availability check. |
| test/Extensions/Orleans.Clustering.Firestore.Tests/FirestoreMembershipTableTests.cs | Adds cancellation to concurrent membership test operations and retries. |
| test/Extensions/Orleans.Clustering.Firestore.Tests/FirestoreEmulatorTests.cs | Adds cancellation to Firestore emulator client calls. |
| test/Extensions/Orleans.Clustering.Consul.Tests/ConsulTestUtils.cs | Adds cancellation to ensure checks and uses publication-only Lazy mode. |
| test/Extensions/Orleans.Clustering.Consul.Tests/ConsulMembershipTableTest.cs | Passes cancellation to Consul availability check. |
| test/Extensions/Orleans.Azure.Tests/UnitTestAzureTableDataManager.cs | Adds cancellation-aware initialization for table manager. |
| test/Extensions/Orleans.Azure.Tests/Streaming/SampleAzureQueueStreamingTests.cs | Passes cancellation to streaming runner. |
| test/Extensions/Orleans.Azure.Tests/Streaming/AQSubscriptionMultiplicityTests.cs | Passes cancellation to runner calls. |
| test/Extensions/Orleans.Azure.Tests/Streaming/AQClientStreamTests.cs | Passes cancellation to runner calls. |
| test/Extensions/Orleans.Azure.Tests/SiloInstanceTableManagerTests.cs | Adds cancellation to async waits and bounded cleanup timeouts. |
| test/Extensions/Orleans.Azure.Tests/Reminder/ReminderTests_Azure_Standalone.cs | Adds cancellation to table start and insert-rate test runner. |
| test/Extensions/Orleans.Azure.Tests/Persistence/PersistenceProviderTests.cs | Adds cancellation to model-based conformance runner. |
| test/Extensions/Orleans.Azure.Tests/Persistence/AzureTableGrainStorageTestKitTests.cs | Passes cancellation into parallel test runner call. |
| test/Extensions/Orleans.Azure.Tests/AzureQueueDataManagerTests.cs | Adds cancellation to parallel Task.WhenAll and wait-until helper. |
| test/Extensions/Orleans.AWS.Tests/Streaming/SQSSubscriptionMultiplicityTests.cs | Passes cancellation to runner calls. |
| test/Extensions/Orleans.AWS.Tests/Streaming/SQSClientStreamTests.cs | Passes cancellation to runner calls. |
| test/Extensions/Orleans.AWS.Tests/StorageTests/DynamoDBStorageProviderTests.cs | Adds cancellation to model-based conformance runner. |
| test/Extensions/Orleans.AWS.Tests/StorageTests/AWSTestConstants.cs | Adds cancellation to DynamoDB availability checks and uses publication-only Lazy mode. |
| test/Extensions/Orleans.AdoNet.Tests/Streaming/AdoNetSubscriptionObserverWithImplicitSubscribingTests.cs | Adds cancellation to relational test setup. |
| test/Extensions/Orleans.AdoNet.Tests/Streaming/AdoNetSubscriptionMultiplicityTests.cs | Adds cancellation to relational test setup and runner calls. |
| test/Extensions/Orleans.AdoNet.Tests/Streaming/AdoNetStreamsBatchingTests.cs | Adds cancellation to relational test setup. |
| test/Extensions/Orleans.AdoNet.Tests/Streaming/AdoNetStreamFilteringTests.cs | Adds cancellation to relational test setup. |
| test/Extensions/Orleans.AdoNet.Tests/Streaming/AdoNetStreamFailureHandlerTests.cs | Adds cancellation to relational test setup and storage reads. |
| test/Extensions/Orleans.AdoNet.Tests/Streaming/AdoNetQueueAdapterTests.cs | Adds cancellation to relational setup and queue receiver/storage operations. |
| test/Extensions/Orleans.AdoNet.Tests/Streaming/AdoNetQueueAdapterFactoryTests.cs | Adds cancellation to relational test setup. |
| test/Extensions/Orleans.AdoNet.Tests/Streaming/AdoNetClientStreamTests.cs | Adds cancellation to relational setup and runner call patterns. |
| test/Extensions/Orleans.AdoNet.Tests/StorageTests/SqlServerRelationalStoreTests.cs | Adds cancellation to setup, cancellation tests, and reads. |
| test/Extensions/Orleans.AdoNet.Tests/StorageTests/RelationalStoreTests.cs | Adds cancellation propagation into stream reads and cancellation test helper. |
| test/Extensions/Orleans.AdoNet.Tests/StorageTests/Relational/TestEnvironmentInvariant.cs | Adds cancellation to storage connectivity checks and setup. |
| test/Extensions/Orleans.AdoNet.Tests/StorageTests/Relational/RelationalStorageTests.cs | Passes cancellation into fixture storage provider creation. |
| test/Extensions/Orleans.AdoNet.Tests/StorageTests/Relational/RelationalStorageDataSourceTests.cs | Links test cancellation into CTS for data source tests. |
| test/Extensions/Orleans.AdoNet.Tests/StorageTests/Relational/CommonFixture.cs | Adds cancellation-aware storage provider creation and lifecycle start. |
| test/Extensions/Orleans.AdoNet.Tests/StorageTests/PostgreSqlRelationalStoreTests.cs | Adds cancellation to setup, cancellation tests, and reads. |
| test/Extensions/Orleans.AdoNet.Tests/StorageTests/MySqlRelationalStoreTests.cs | Adds cancellation to setup, cancellation tests, and reads. |
| test/Extensions/Orleans.AdoNet.Tests/SqlServerMembershipTableTests.cs | Adds cancellation to relational setup. |
| test/Extensions/Orleans.AdoNet.Tests/Reminders/SqlServerRemindersTableTests.cs | Adds cancellation to relational setup. |
| test/Extensions/Orleans.AdoNet.Tests/Reminders/ReminderTests_AdoNet_SqlServer.cs | Adds cancellation propagation into reminder tests and init cleanup. |
| test/Extensions/Orleans.AdoNet.Tests/Reminders/PostgreSqlRemindersTableTests.cs | Adds cancellation to relational setup. |
| test/Extensions/Orleans.AdoNet.Tests/Reminders/MySqlRemindersTableTests.cs | Adds cancellation to relational setup. |
| test/Extensions/Orleans.AdoNet.Tests/PostgreSqlMembershipTableTests.cs | Adds cancellation to relational setup. |
| test/Extensions/Orleans.AdoNet.Tests/Persistence/PersistenceGrainTests_SqlServer.cs | Adds cancellation to relational setup. |
| test/Extensions/Orleans.AdoNet.Tests/Persistence/PersistenceGrainTests_SqlServer_DeleteStateOnClear.cs | Adds cancellation to relational setup. |
| test/Extensions/Orleans.AdoNet.Tests/Persistence/PersistenceGrainTests_Postgres.cs | Adds cancellation to relational setup. |
| test/Extensions/Orleans.AdoNet.Tests/Persistence/PersistenceGrainTests_Postgres_DeleteStateOnClear.cs | Adds cancellation to relational setup. |
| test/Extensions/Orleans.AdoNet.Tests/Persistence/PersistenceGrainTests_MySql.cs | Adds cancellation to relational setup. |
| test/Extensions/Orleans.AdoNet.Tests/Persistence/PersistenceGrainTests_MySql_DeleteStateOnClear.cs | Adds cancellation to relational setup. |
| test/Extensions/Orleans.AdoNet.Tests/MySqlMembershipTableTests.cs | Adds cancellation to relational setup. |
| test/Extensions/Orleans.AdoNet.Tests/LivenessTests.cs | Adds cancellation to relational setup. |
| test/Extensions/Orleans.AdoNet.Tests/GrainDirectory/AdoNetGrainDirectoryClusterTests.cs | Adds cancellation to relational setup. |
| test/Extensions/Google/GoogleEmulatorHost.cs | Adds cancellation to emulator availability check. |
| test/DistributedTests/DistributedTests.Server/ServerRunner.cs | Adds cancellation to distributed server lifecycle and channel operations. |
| test/DistributedTests/DistributedTests.Server/ServerCommand.cs | Plumbs CancellationToken through System.CommandLine handler to server runner. |
| test/DistributedTests/DistributedTests.Grains/TreeGrain.cs | Adds cancellation-aware grain ping fan-out. |
| test/DistributedTests/DistributedTests.Grains/PingGrain.cs | Adds cancellation-aware ping implementation. |
| test/DistributedTests/DistributedTests.Grains/ImplicitSubscriberGrain.cs | Adds cancellation-aware counter retrieval. |
| test/DistributedTests/DistributedTests.Grains/CounterReportingGrain.cs | Adds cancellation-aware counter aggregation and reporting waits. |
| test/DistributedTests/DistributedTests.Common/GrainInterfaces/ITreeGrain.cs | Adds cancellation token to grain interface. |
| test/DistributedTests/DistributedTests.Common/GrainInterfaces/IStreamingGrains.cs | Adds cancellation token to streaming/counter grain interfaces. |
| test/DistributedTests/DistributedTests.Common/GrainInterfaces/IPingGrain.cs | Adds cancellation token to ping grain interface. |
| test/DistributedTests/DistributedTests.Client/LoadGeneratorScenario/LoadGeneratorScenarios.cs | Adds cancellation to load generator scenario interface and implementations. |
| test/DistributedTests/DistributedTests.Client/LoadGeneratorScenario/LoadGeneratorScenarioRunner.cs | Adds cancellation to client runner lifecycle and load run duration handling. |
| test/DistributedTests/DistributedTests.Client/Commands/ScenarioCommand.cs | Plumbs CancellationToken through System.CommandLine handler to runner. |
| test/DistributedTests/DistributedTests.Client/Commands/CounterCaptureCommand.cs | Plumbs CancellationToken through command handler and uses cancellation-aware delays/calls. |
| test/DistributedTests/DistributedTests.Client/Commands/ChaosAgentCommand.cs | Plumbs CancellationToken through command handler and uses cancellation-aware delays/channel operations. |
| test/Directory.Build.props | Removes global suppression of xUnit1051 from test projects. |
| src/Orleans.Transactions.TestKit.Base/TestRunners/TransactionRecoveryTestsRunner.cs | Updates transaction recovery watchdog call signature (but currently passes CancellationToken.None). |
| src/Orleans.Transactions.TestKit.Base/TestRunners/TransactionRecoveryEventObserver.cs | Adds cancellation-aware overload for phase gate waits. |
| src/Orleans.TestingHost/TestClusterBuilder.cs | Adds cancellation-aware silo creation delegate support. |
| src/Orleans.TestingHost/SiloHandle.cs | Adds cancellation-aware StopSiloAsync overload. |
| src/Orleans.TestingHost/InProcessSiloHandle.cs | Adds cancellation-aware silo startup overload and disposal-on-startup-failure. |
| src/Orleans.Reminders.TestKit/ReminderTableIntrospection.cs | Removes optional cancellation default on a public gate API (breaking change). |
Review details
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
- Files reviewed: 205/338 changed files
- Comments generated: 3
- Review effort level: Lite
Contributor
Code coverage78.53% line coverage - 99,422 / 126,605 lines Coverage details
|
Contributor
There was a problem hiding this comment.
Review details
Suppressed comments (1)
Previously missed (1) — in code that hasn't changed since the last review.
src/Orleans.Transactions.TestKit.Base/TestRunners/TransactionRecoveryEventObserver.cs:617
- When the gate has already been reached, awaiting
reached.TaskwithWaitAsync(cancellationToken)can throwOperationCanceledExceptionif the token is already canceled, even though the transition result is already available. This changes behavior compared to the priorawait reached.Taskpath and can cause unexpected cancellation during teardown or after-the-fact reads.
- Files reviewed: 201/342 changed files
- Comments generated: 0 new
- Review effort level: Lite
This was referenced Aug 31, 2026
This was referenced Sep 7, 2026
Open
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.
Problem
The test build globally suppressed xUnit1051, so Microsoft Testing Platform and xUnit cancellation did not consistently reach long-running waits, lifecycle operations, storage calls, streams, reminders, transactions, and provider test helpers.
Solution
TestContext.Current.CancellationTokenthroughout the test suitesRationale
Cooperative cancellation now reaches the operation performing the work, allowing stopped or timed-out test runs to terminate promptly while preserving existing timeout and cleanup behavior.
Microsoft Reviewers: Open in CodeFlow