void Propagate(IResultListener rt, ResultTable result) { try { rt.OnResultPublished(stepRun.Id, result); } catch (Exception e) { log.Warning("Caught exception in result handling task."); log.Debug(e); planRun.RemoveFaultyResultListener(rt); } }
/// <summary> /// Called by OpenTAP when the source TestStep publishes results. This is happening in a background thread. /// </summary> public void OnResultPublished(TestStepRun stepRun, ResultTable result) { if (stepRun.TestStepId == SourceTestStep?.Id) { ResultColumn column = result.Columns.FirstOrDefault(col => col.Name == ResultColumnName); if (column != null) { lock (Result) { Result.Enqueue(column.GetValue <T>(0)); ItemsInQueue.Set(); } } } }
public override void OnResultPublished(Guid stepRunId, ResultTable result) { foreach (IResultSink sink in currentSinks) { try { sink.OnResultPublished(currentStepRuns[stepRunId], result); } catch (Exception ex) { Log.Error($"{TypeData.GetTypeData(sink).Name} caused an error."); Log.Debug(ex); } } }
private void DoStore(ResultTable obj) { planRun.ScheduleInResultProcessingThread <IResultListener>(l => Propagate(l, obj)); }