public bool ProcessParallel(IResultSetService actual) { Trace.WriteLineIf(Extensibility.NBiTraceSwitch.TraceVerbose, string.Format("Queries exectued in parallel.")); Parallel.Invoke( () => { rsChild = actual.Execute(); }, () => { rsParent = parentService.Execute(); } ); return(Matches(rsChild)); }
public virtual bool ProcessParallel(IResultSetService actual) { Trace.WriteLineIf(Extensibility.NBiTraceSwitch.TraceVerbose, string.Format("Queries exectued in parallel.")); Parallel.Invoke( () => { rsCandidate = actual.Execute(); }, () => { rsReference = referenceService.Execute(); } ); return(Matches(rsCandidate)); }
protected bool doMatch(ResultSet actual) { actualResultSet = actual; //This is needed if we don't use //ism if (expectedResultSet == null) { expectedResultSet = expect.Execute(); } result = Engine.Compare(actualResultSet, expectedResultSet); var output = result.Difference == ResultSetDifferenceType.None; if (output && Configuration?.FailureReportProfile.Mode == FailureReportMode.Always) { Assert.Pass(Failure.RenderMessage()); } return(output); }
/// <summary> /// Handle an IDbCommand (Query and ConnectionString) and check it with the expectation (Another IDbCommand or a ResultSet) /// </summary> /// <param name="actual">IDbCommand</param> /// <returns></returns> public bool Process(IResultSetService actual) { ResultSet rsActual = null; if (parallelizeQueries) { rsActual = ProcessParallel(actual); } else { rsActual = actual.Execute(); } return(this.Matches(rsActual)); }
public ResultSet ProcessParallel(IResultSetService actual) { Trace.WriteLineIf(NBiTraceSwitch.TraceVerbose, string.Format("Queries exectued in parallel.")); ResultSet rsActual = null; System.Threading.Tasks.Parallel.Invoke( () => { rsActual = actual.Execute(); }, () => { expectedResultSet = expect.Execute(); } ); return(rsActual); }