Ejemplo n.º 1
0
 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);
     }
 }
Ejemplo n.º 2
0
 /// <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();
             }
         }
     }
 }
Ejemplo n.º 3
0
 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);
         }
     }
 }
Ejemplo n.º 4
0
 private void DoStore(ResultTable obj)
 {
     planRun.ScheduleInResultProcessingThread <IResultListener>(l => Propagate(l, obj));
 }