mirror of
https://github.com/ckaczor/sqltoolsservice.git
synced 2026-01-27 01:25:42 -05:00
Changed how the test awaits on executed queries to make it more reliable (#427)
This commit is contained in:
@@ -15,10 +15,10 @@ namespace Microsoft.SqlTools.ServiceLayer.QueryExecution
|
||||
/// </summary>
|
||||
public class ResultOnlyContext<TResult> : IEventSender
|
||||
{
|
||||
private readonly RequestContext<TResult> origContext;
|
||||
private readonly RequestContext<TResult> OrigContext;
|
||||
|
||||
public ResultOnlyContext(RequestContext<TResult> context) {
|
||||
origContext = context;
|
||||
OrigContext = context;
|
||||
}
|
||||
|
||||
public virtual Task SendEvent<TParams>(EventType<TParams> eventType, TParams eventParams)
|
||||
@@ -27,5 +27,10 @@ namespace Microsoft.SqlTools.ServiceLayer.QueryExecution
|
||||
// in the future this could be used to roll up events and send them back in the result
|
||||
return Task.FromResult(true);
|
||||
}
|
||||
|
||||
public virtual Task SendError(string errorMessage, int errorCode = 0)
|
||||
{
|
||||
return OrigContext.SendError(errorMessage, errorCode);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user