public void Fail(ClientRun clientRun) { RemainingRuns--; ActiveClientId = null; RunStatus = RemainingRuns > 0 ? RunStatusType.Running : RunStatusType.Finished; Result = new RunUserAgentResult(clientRun); }
void SetCounts(ClientRun clientRun) { // counts for rollups are only based on failed or passed runs if (clientRun.GetStatus() == ClientRunStatus.Fail || clientRun.GetStatus() == ClientRunStatus.Pass) { TotalTests = clientRun.TotalCount; FailedTests = clientRun.FailCount; } }
public RunUserAgentResult(ClientRun clientRun) { if (clientRun == null) { ClientId = null; Status = ClientRunStatus.NotStarted; CellContents = string.Empty; TotalTests = null; FailedTests = null; } else { ClientId = clientRun.Client.Id; Status = clientRun.GetStatus(); CellContents = clientRun.GetStatusCellContents(); SetCounts(clientRun); } }
public void BeginClientRun(Client client) { client.Updated = SystemTime.NowThunk(); if (RunStatus == RunStatusType.NotStarted) { RunStatus = RunStatusType.Running; } var clientRun = new ClientRun(client, this); clientRun.Start(); ClientRuns.Add(clientRun); RunUserAgent runUserAgent = GetRunUserAgent(client); if (runUserAgent != null) runUserAgent.StartOrContinue(client); Job.StartOrContinue(); }
void RemoveClientRun(ClientRun clientRun) { clientRun.RemoveFromRun(); ClientRuns.Remove(clientRun); }
void PassRunUserAgent(ClientRun passingRun) { Client client = passingRun.Client; RunUserAgent runUserAgent = GetRunUserAgent(client); runUserAgent.Pass(passingRun); }
void FailRunUserAgent(ClientRun failure) { RunUserAgent runUserAgent = GetRunUserAgent(failure.Client); runUserAgent.Fail(failure); }
public void Pass(ClientRun passingRun) { RemovePreviousFailuresForThisUserAgent(passingRun.Client.UserAgent); PassRunUserAgent(passingRun); RefreshStatusBasedOnRunUserAgents(); }
public void Fail(ClientRun failure) { RemoveTimedOutClients(exception: failure); FailRunUserAgent(failure); RefreshStatusBasedOnRunUserAgents(); }
public string GetContents(ClientRun clientRun) { return GetContentsFunc(clientRun.FailCount, clientRun.ErrorCount, clientRun.TotalCount); }
public static ClientRunStatus FromClientRun(ClientRun clientRun) { return FromData(clientRun.RunStatus, clientRun.FailCount, clientRun.ErrorCount, clientRun.TotalCount); }
public void Pass(ClientRun clientRun) { RemainingRuns = 0; ActiveClientId = null; RunStatus = RunStatusType.Finished; Result = new RunUserAgentResult(clientRun); }