-
Notifications
You must be signed in to change notification settings - Fork 2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
WIP: add & use in-process test cluster
- Loading branch information
1 parent
c96f09f
commit a907ae1
Showing
4 changed files
with
45 additions
and
55 deletions.
There are no files selected for viewing
This file contains 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
33 changes: 33 additions & 0 deletions
33
test/TesterInternal/ActivationRebalancingTests/RebalancerFixture.cs
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
using TestExtensions; | ||
using Orleans.Configuration; | ||
using Orleans.TestingHost; | ||
using Microsoft.Extensions.DependencyInjection; | ||
|
||
namespace UnitTests.ActivationRebalancingTests; | ||
|
||
public class RebalancerFixture : BaseInProcessTestClusterFixture | ||
{ | ||
public static readonly TimeSpan RebalancerDueTime = TimeSpan.FromSeconds(5); | ||
public static readonly TimeSpan SessionCyclePeriod = TimeSpan.FromSeconds(3); | ||
|
||
protected override void ConfigureTestCluster(InProcessTestClusterBuilder builder) | ||
{ | ||
builder.Options.InitialSilosCount = 4; | ||
builder.Options.UseRealEnvironmentStatistics = true; | ||
builder.ConfigureSilo((options, siloBuilder) | ||
#pragma warning disable ORLEANSEXP002 | ||
=> siloBuilder | ||
.Configure<SiloMessagingOptions>(o => | ||
{ | ||
o.AssumeHomogenousSilosForTesting = true; | ||
o.ClientGatewayShutdownNotificationTimeout = default; | ||
}) | ||
.Configure<ActivationRebalancerOptions>(o => | ||
{ | ||
o.RebalancerDueTime = RebalancerDueTime; | ||
o.SessionCyclePeriod = SessionCyclePeriod; | ||
}) | ||
.AddActivationRebalancer()); | ||
#pragma warning restore ORLEANSEXP002 | ||
} | ||
} |
This file contains 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
This file contains 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