Пример #1
0
        private void OnTime(object state)
        {
            mTimer.Change(-1, -1);
            try
            {
                if (mCurrentTest != null)
                {
                    Loger.Process(LogType.DEBUG, mCurrentTest.StatisticalInfo.ToString());
                    Network.StatisticalReport resport = new Network.StatisticalReport();
                    resport.UnitTest = Name;
                    resport.Info     = mCurrentTest.StatisticalInfo;
                    mClient.Send(resport);

                    Network.ReportDelayTimes reporttimes = new ReportDelayTimes();
                    reporttimes.UnitTest = this.Name;
                    reporttimes.Times    = mCurrentTest.GetDelayTimes();
                    mClient.Send(reporttimes);

                    Network.ReportErrors reportErrors = new ReportErrors();
                    reportErrors.UnitTest = this.Name;
                    reportErrors.Errors   = mCurrentTest.GetErrors();
                    mClient.Send(reportErrors);
                }
            }
            catch (Exception e_)
            {
            }
            finally
            {
                mTimer.Change(1000, 1000);
            }
        }
Пример #2
0
        public void OnReportDelayTime(ReportDelayTimes e)
        {
            NodeInfo node = this.Nodes.FirstOrDefault(n => n.Name == e.Node);

            if (node != null)
            {
                node.Report.DelayTimes.AddRange(e.Times);
            }
        }
Пример #3
0
        public void OnReportTimes(ReportDelayTimes e)
        {
            ISession mamager = null;

            if (mUnitTestManagers.TryGetValue(e.UnitTest, out mamager))
            {
                mamager.Send(e);
            }
        }