-
Notifications
You must be signed in to change notification settings - Fork 273
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add orchestration query tests #3029
base: dev
Are you sure you want to change the base?
Conversation
funcProcess.ErrorDataReceived += (sender, e) => logger.LogError(e?.Data); | ||
funcProcess.OutputDataReceived += (sender, e) => logger.LogInformation(e?.Data); | ||
funcProcess.ErrorDataReceived += (sender, e) => { try { logger.LogError(e?.Data); } catch (Exception) { Console.WriteLine("ERROR: Could not write error to test logger!"); Console.WriteLine(e?.Data); } }; | ||
funcProcess.OutputDataReceived += (sender, e) => { try { logger.LogInformation(e?.Data); } catch (Exception) { Console.WriteLine("ERROR: Could not write information to test logger!"); Console.WriteLine(e?.Data); } } ; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you want to make this more precise, just catch InvalidOperationException
and do nothing - this is normal when the test process is shutting down.
{ | ||
try | ||
{ | ||
OrchestrationQuery filter = new OrchestrationQuery(Statuses: new List<OrchestrationRuntimeStatus> { OrchestrationRuntimeStatus.Running, OrchestrationRuntimeStatus.Pending, OrchestrationRuntimeStatus.Suspended }); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: wrap this into multiple lines. It's recommended to keep line lengths less than 120 chars or so.
OrchestrationQuery filter = new OrchestrationQuery(Statuses: new List<OrchestrationRuntimeStatus> { OrchestrationRuntimeStatus.Running, OrchestrationRuntimeStatus.Pending, OrchestrationRuntimeStatus.Suspended }); | |
OrchestrationQuery filter = new OrchestrationQuery(Statuses: new List<OrchestrationRuntimeStatus> | |
{ | |
OrchestrationRuntimeStatus.Running, | |
OrchestrationRuntimeStatus.Pending, | |
OrchestrationRuntimeStatus.Suspended, | |
}); |
public static class OrchestrationQueryFunctions | ||
{ | ||
[Function(nameof(GetAllStatus))] | ||
public static async Task<HttpResponseData> GetAllStatus( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: Consider naming this GetAllInstances
} | ||
|
||
[Function(nameof(GetRunningStatus))] | ||
public static async Task<HttpResponseData> GetRunningStatus( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: Consider naming this GetRunningInstances
.
Adds tests for client.GetAllInstancesAsync() in dotnet-isolated
Pull request checklist
pending_docs.md
release_notes.md
/src/Worker.Extensions.DurableTask/AssemblyInfo.cs
dev
andmain
branches and will not be merged into thev2.x
branch.