예제 #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( );
            }
        }
예제 #2
0
 protected virtual void OnTestFinished(ITest test, TestResult result)
 {
     test.Completed(result);
     TestCompletedHandler handler = TestFinished;
     if (handler != null) handler(test, result);
 }