Exemple #1
0
        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);
     }
 }
Exemple #4
0
        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();
        }
Exemple #5
0
 void RemoveClientRun(ClientRun clientRun)
 {
     clientRun.RemoveFromRun();
     ClientRuns.Remove(clientRun);
 }
Exemple #6
0
 void PassRunUserAgent(ClientRun passingRun)
 {
     Client client = passingRun.Client;
     RunUserAgent runUserAgent = GetRunUserAgent(client);
     runUserAgent.Pass(passingRun);
 }
Exemple #7
0
 void FailRunUserAgent(ClientRun failure)
 {
     RunUserAgent runUserAgent = GetRunUserAgent(failure.Client);
     runUserAgent.Fail(failure);
 }
Exemple #8
0
 public void Pass(ClientRun passingRun)
 {
     RemovePreviousFailuresForThisUserAgent(passingRun.Client.UserAgent);
     PassRunUserAgent(passingRun);
     RefreshStatusBasedOnRunUserAgents();
 }
Exemple #9
0
 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);
 }
Exemple #12
0
        public void Pass(ClientRun clientRun)
        {
            RemainingRuns = 0;
            ActiveClientId = null;
            RunStatus = RunStatusType.Finished;

            Result = new RunUserAgentResult(clientRun);
        }