protected override void HandleEndSpec(EndSpec endSpec)
 {
     if (UseTestCoordinator)
     {
         TestCoordinatorActorRef.Tell(endSpec);
     }
 }
Exemple #2
0
        protected override void HandleEndSpec(EndSpec endSpec)
        {
            base.HandleEndSpec(endSpec);

            _session.OnEnd(endSpec);
            ReportSpec(_session, _testRun, _computerName, endSpec.Log);

            _session = null;
        }
Exemple #3
0
        private async Task ReceiveEndSpecRun(EndSpec spec)
        {
            //Should receive a FactData in return
            var factData = await _currentSpecRunActor.Ask <FactData>(spec, TimeSpan.FromSeconds(2));

            TestRunData.AddSpec(factData);

            //Publish the FactData back to any subscribers who wanted it
            foreach (var subscriber in Subscribers)
            {
                subscriber.Tell(factData);
            }

            //Ready to begin the next spec
            _currentSpecRunActor = null;
        }
        /// <summary>
        /// Wait for all child <see cref="NodeDataActor"/> instances to finish processing
        /// and report their results
        /// </summary>
        /// <returns>An awaitable task, since this operation uses the <see cref="Futures.Ask"/> pattern</returns>
        private Task HandleEndSpec(EndSpec endSpec)
        {
            var futures = new Task<NodeData>[Nodes.Count];

            var i = 0;
            foreach (var node in _nodeActors)
            {
                futures[i] = node.Value.Ask<NodeData>(endSpec, TimeSpan.FromSeconds(1));
                i++;
            }

            var sender = Context.Sender;

            //wait for all Ask operations to complete and pipe the result back to ourselves, including the ref for the original sender
            return Task.WhenAll(futures)
                .PipeTo(Self, sender);
        }
Exemple #5
0
        /// <summary>
        /// Wait for all child <see cref="NodeDataActor"/> instances to finish processing
        /// and report their results
        /// </summary>
        /// <returns>An awaitable task, since this operation uses the <see cref="Futures.Ask"/> pattern</returns>
        private void HandleEndSpec(EndSpec endSpec)
        {
            var futures = new Task <NodeData> [Nodes.Count];

            var i = 0;

            foreach (var node in _nodeActors)
            {
                futures[i] = node.Value.Ask <NodeData>(endSpec, TimeSpan.FromSeconds(1));
                i++;
            }

            var sender = Context.Sender;

            //wait for all Ask operations to complete and pipe the result back to ourselves, including the ref for the original sender
            Task.WhenAll(futures)
            .PipeTo(Self, sender);
        }
Exemple #6
0
        private void ReceiveEndSpecRun(EndSpec spec)
        {
            //Should receive a FactData in return
            var specCompleteTask = _currentSpecRunActor.Ask <FactData>(spec, TimeSpan.FromSeconds(2));

            //Going to block so we can't accidentally start processing  messages for a new spec yet..
            specCompleteTask.Wait();

            //Got the result we needed
            var factData = specCompleteTask.Result;

            TestRunData.AddSpec(factData);

            //Publish the FactData back to any subscribers who wanted it
            foreach (var subscriber in Subscribers)
            {
                subscriber.Tell(factData);
            }

            //Ready to begin the next spec
            _currentSpecRunActor = null;
        }
        protected override void HandleEndSpec(EndSpec endSpec)
        {
            WriteSpecMessage("Spec completed.");

            base.HandleEndSpec(endSpec);
        }
 protected abstract void HandleEndSpec(EndSpec endSpec);
        private async Task ReceiveEndSpecRun(EndSpec spec)
        {
            //Should receive a FactData in return
            var factData = await _currentSpecRunActor.Ask<FactData>(spec, TimeSpan.FromSeconds(2));

            TestRunData.AddSpec(factData);

            //Publish the FactData back to any subscribers who wanted it
            foreach (var subscriber in Subscribers)
            {
                subscriber.Tell(factData);
            }

            //Ready to begin the next spec
            _currentSpecRunActor = null;
        }
        private void ReceiveEndSpecRun(EndSpec spec)
        {
            //Should receive a FactData in return
            var specCompleteTask = _currentSpecRunActor.Ask<FactData>(spec, TimeSpan.FromSeconds(2));

            //Going to block so we can't accidentally start processing  messages for a new spec yet..
            specCompleteTask.Wait();

            //Got the result we needed
            var factData = specCompleteTask.Result;
            TestRunData.AddSpec(factData);

            //Publish the FactData back to any subscribers who wanted it
            foreach (var subscriber in Subscribers)
            {
                subscriber.Tell(factData);
            }

            //Ready to begin the next spec
            _currentSpecRunActor = null;
        }
Exemple #11
0
 public void OnEnd(EndSpec value) => End = new SpecEvent <EndSpec>(DateTime.UtcNow, value);