InProcessTestCluster
class
Namespace: Orleans.TestingHost
A host class for local testing with Orleans using in-process silos.
public sealed class InProcessTestCluster : IAsyncDisposable, IDisposableConstructors
InProcessTestCluster(InProcessTestClusterOptions, ITestClusterPortAllocator)Configures the test cluster plus client in-process.
Properties
ClientThe client.OptionsOptions used to configure the test cluster.PortAllocatorThe port allocator.SilosCollection of all known silos.
Methods
CreateSiloAsync(InProcessTestSiloSpecificOptions)DeactivateAsync(GrainId)Deactivates the current activation of the specified grain and waits for deactivation to complete.DeactivateAsync(IAddressable)Deactivates the current activation of the specified grain and waits for deactivation to complete.DeployAsyncDeploys the cluster using the specified configuration and starts the client in-process.DisposePerforms application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.DisposeAsyncPerforms application-defined tasks associated with freeing, releasing, or resetting unmanaged resources asynchronously.GetActiveSilosGet the list of current active silos.GetLivenessStabilizationTime(ClusterMembershipOptions, bool)Get the timeout value to use to wait for the silo liveness sub-system to detect and act on any recent cluster membership changes.GetLogGets the log.GetSiloForAddress(SiloAddress)Find the silo handle for the specified silo address.GetSiloServiceProvider(SiloAddress)Returns theSystem.IServiceProviderassociated with the givensilo.InitializeClientAsyncInitialize the grain client. This should be already done byInProcessTestClusterKillClientAsyncPerforms a hard kill on client. Client will not cleanup resources.KillSiloAsync(InProcessSiloHandle)Do an immediate Kill of the specified silo.MigrateAsync(GrainId, SiloAddress?)Migrates the current activation of the specified grain to a different silo and waits for migration to complete. IftargetSilois specified, a placement hint is set to guide migration to that silo.MigrateAsync(IAddressable, SiloAddress?)Migrates the current activation of the specified grain to a different silo and waits for migration to complete. IftargetSilois specified, a placement hint is set to guide migration to that silo.RestartSiloAsync(InProcessSiloHandle)Do a Stop or Kill of the specified silo, followed by a restart.RestartStoppedSecondarySiloAsync(string)Restart a previously stopped.StartAdditionalSiloStart an additional silo, so that it joins the existing cluster.StartAdditionalSilo(bool)Start an additional silo, so that it joins the existing cluster.StartAdditionalSiloAsyncStart an additional silo, so that it joins the existing cluster.StartAdditionalSiloAsync(bool)Start an additional silo, so that it joins the existing cluster.StartSiloAsync(int, InProcessTestClusterOptions)Starts a new silo.StartSiloAsync(int, InProcessTestClusterOptions, IReadOnlyList<IConfigurationSource>, bool)Starts a new silo.StartSiloAsync(InProcessTestCluster, int, InProcessTestClusterOptions)Start a new silo in the target clusterStartSiloAsync(InProcessTestCluster, int, InProcessTestClusterOptions, IReadOnlyList<IConfigurationSource>, bool)Start a new silo in the target clusterStartSilosAsync(int)Start a number of additional silo, so that they join the existing cluster.StartSilosAsync(int, bool)Start a number of additional silo, so that they join the existing cluster.StopAllSilosStop all current silos.StopAllSilosAsyncStop all current silos.StopClusterClientAsyncStop cluster client as an asynchronous operation.StopSiloAsync(InProcessSiloHandle)Do a semi-graceful Stop of the specified silo.StopSilosAsyncStop all silos.TryGetGrainContext(GrainId, IGrainContext?)Attempts to find theIGrainContextfor the grain with the specifiedgrainIdby searching all silos in the cluster.WaitForClusterManifestToStabilizeAsync(bool)Wait for active silos to observe cluster manifest updates for all active silos.WaitForDeactivationAsync(GrainId)Gets aSystem.Threading.Tasks.Taskthat completes when the current activation of the specified grain finishes deactivating. If the grain is not currently activated, returnsSystem.Threading.Tasks.Task.CompletedTask.WaitForDeactivationAsync(IAddressable)Gets aSystem.Threading.Tasks.Taskthat completes when the current activation of the specified grain finishes deactivating. If the grain is not currently activated, returnsSystem.Threading.Tasks.Task.CompletedTask.WaitForLivenessToStabilizeAsync(bool)Wait for the silo liveness sub-system to detect and act on any recent cluster membership changes.
