From 5ed80ce66b74ad1e2cff9fea9a2cc156a918b626 Mon Sep 17 00:00:00 2001 From: ReubenBond Date: Tue, 30 Jan 2018 22:07:55 +1100 Subject: [PATCH 1/3] TestCluster: set instance number for new Silo handles --- src/Orleans.TestingHost/TestCluster.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/Orleans.TestingHost/TestCluster.cs b/src/Orleans.TestingHost/TestCluster.cs index 29be9e02e6..d8191f3ea4 100644 --- a/src/Orleans.TestingHost/TestCluster.cs +++ b/src/Orleans.TestingHost/TestCluster.cs @@ -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; } From 0cc179889e1cecd1b62f4765ba5105652eb108de Mon Sep 17 00:00:00 2001 From: ReubenBond Date: Wed, 31 Jan 2018 06:17:06 +1100 Subject: [PATCH 2/3] StreamRel test fix --- test/TesterAzureUtils/Streaming/StreamReliabilityTests.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/TesterAzureUtils/Streaming/StreamReliabilityTests.cs b/test/TesterAzureUtils/Streaming/StreamReliabilityTests.cs index d620505c84..7c16f8e6a8 100644 --- a/test/TesterAzureUtils/Streaming/StreamReliabilityTests.cs +++ b/test/TesterAzureUtils/Streaming/StreamReliabilityTests.cs @@ -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()) { @@ -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) From 4a60248fcb8845b1f984e7dc0a9d87e1f4bc349e Mon Sep 17 00:00:00 2001 From: ReubenBond Date: Wed, 31 Jan 2018 07:07:46 +1100 Subject: [PATCH 3/3] UseTestClusterMembership = false in AzureLivenessTests --- test/TesterAzureUtils/AzureLivenessTests.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/test/TesterAzureUtils/AzureLivenessTests.cs b/test/TesterAzureUtils/AzureLivenessTests.cs index 2920981057..80deb03660 100644 --- a/test/TesterAzureUtils/AzureLivenessTests.cs +++ b/test/TesterAzureUtils/AzureLivenessTests.cs @@ -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;