/// <summary> /// Get the timeout value to use to wait for the silo liveness sub-system to detect and act on any recent cluster membership changes. /// <seealso cref="WaitForLivenessToStabilizeAsync"/> /// </summary> public static TimeSpan GetLivenessStabilizationTime(GlobalConfiguration global, bool didKill = false) { TimeSpan stabilizationTime = TimeSpan.Zero; if (didKill) { // in case of hard kill (kill and not Stop), we should give silos time to detect failures first. stabilizationTime = TestingUtils.Multiply(global.ProbeTimeout, global.NumMissedProbesLimit); } if (global.UseLivenessGossip) { stabilizationTime += TimeSpan.FromSeconds(5); } else { stabilizationTime += TestingUtils.Multiply(global.TableRefreshTimeout, 2); } return(stabilizationTime); }
/// <summary> /// Get the timeout value to use to wait for the silo liveness sub-system to detect and act on any recent cluster membership changes. /// <seealso cref="WaitForLivenessToStabilizeAsync"/> /// </summary> public static TimeSpan GetLivenessStabilizationTime(ClusterMembershipOptions clusterMembershipOptions, bool didKill = false) { TimeSpan stabilizationTime = TimeSpan.Zero; if (didKill) { // in case of hard kill (kill and not Stop), we should give silos time to detect failures first. stabilizationTime = TestingUtils.Multiply(clusterMembershipOptions.ProbeTimeout, clusterMembershipOptions.NumMissedProbesLimit); } if (clusterMembershipOptions.UseLivenessGossip) { stabilizationTime += TimeSpan.FromSeconds(5); } else { stabilizationTime += TestingUtils.Multiply(clusterMembershipOptions.TableRefreshTimeout, 2); } return(stabilizationTime); }