Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TestCluster: set instance number for new Silo handles #3939

Merged
merged 3 commits into from
Jan 30, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/Orleans.TestingHost/TestCluster.cs
Original file line number Diff line number Diff line change
Expand Up @@ -478,6 +478,7 @@ public static SiloHandle StartOrleansSilo(TestCluster cluster, int instanceNumbe
var handle = cluster.LoadSiloInNewAppDomain(
siloSpecificOptions.SiloName,
configurationSources);
handle.InstanceNumber = (short)instanceNumber;
Interlocked.Increment(ref cluster.startedInstances);
return handle;
}
Expand Down
1 change: 1 addition & 0 deletions test/TesterAzureUtils/AzureLivenessTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ public LivenessTests_AzureTable(ITestOutputHelper output) : base(output)
protected override void ConfigureTestCluster(TestClusterBuilder builder)
{
TestUtils.CheckForAzureStorage();
builder.Options.UseTestClusterMembership = false;
builder.ConfigureLegacyConfiguration(legacy =>
{
legacy.ClusterConfiguration.Globals.DataConnectionString = TestDefaultConfiguration.DataConnectionString;
Expand Down
4 changes: 2 additions & 2 deletions test/TesterAzureUtils/Streaming/StreamReliabilityTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -923,7 +923,7 @@ private void RestartAllSilos()
output.WriteLine("\n\n\n\n-----------------------------------------------------\n" +
"Restarting all silos - Old Primary={0} Secondary={1}" +
"\n-----------------------------------------------------\n\n\n",
this.HostedCluster.Primary.SiloAddress, this.HostedCluster.SecondarySilos.First().SiloAddress);
this.HostedCluster.Primary?.SiloAddress, this.HostedCluster.SecondarySilos.FirstOrDefault()?.SiloAddress);

foreach (var silo in this.HostedCluster.GetActiveSilos().ToList())
{
Expand All @@ -936,7 +936,7 @@ private void RestartAllSilos()
output.WriteLine("\n\n\n\n-----------------------------------------------------\n" +
"Restarted new silos - New Primary={0} Secondary={1}" +
"\n-----------------------------------------------------\n\n\n",
this.HostedCluster.Primary.SiloAddress, this.HostedCluster.SecondarySilos.First().SiloAddress);
this.HostedCluster.Primary?.SiloAddress, this.HostedCluster.SecondarySilos.FirstOrDefault()?.SiloAddress);
}

private void StopSilo(SiloHandle silo, bool kill, bool restart)
Expand Down