protected override void HandleEndSpec(EndSpec endSpec) { if (UseTestCoordinator) { TestCoordinatorActorRef.Tell(endSpec); } }
protected override void HandleEndSpec(EndSpec endSpec) { base.HandleEndSpec(endSpec); _session.OnEnd(endSpec); ReportSpec(_session, _testRun, _computerName, endSpec.Log); _session = null; }
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); }
/// <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); }
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; }
public void OnEnd(EndSpec value) => End = new SpecEvent <EndSpec>(DateTime.UtcNow, value);