示例#1
0
        private void SimulateSend( )
        {
            // Naive atetmpt to simulate network latency
            Thread.Sleep(_rand.Next(MAX_LAG));

            int totalMessagesSent = _test.TotalMessagesSent;

            // LORENZO: print all data and validate that they match the data sent
            if (Interlocked.Increment(ref _forSending) == totalMessagesSent && totalMessagesSent >= _test.TotalMessagesToSend)
            {
                _test.Completed( );
            }
        }
 protected virtual void OnTestFinished(ITest test, TestResult result)
 {
     test.Completed(result);
     TestCompletedHandler handler = TestFinished;
     if (handler != null) handler(test, result);
 }