-
Notifications
You must be signed in to change notification settings - Fork 518
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 Tests for Jobs and Client #2725
Conversation
@@ -259,6 +260,40 @@ public async Task GivenGroupJobs_WhenCancelJobsByGroupId_ThenAllJobsShouldBeCanc | |||
Assert.Equal(jobInfo2.Result, jobInfo.Result); | |||
} | |||
|
|||
[Fact] | |||
public async Task GivenGroupJobs_WhenCancelJobsByGroupIdCalledTwoTimes_ThenJobStatusShouldNotChange() |
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.
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.
Sorry, I will modify the name of the function.
await sqlQueueClient.CancelJobByGroupIdAsync(queueType, jobInfo2.GroupId, CancellationToken.None); | ||
Assert.True((await sqlQueueClient.GetJobByGroupIdAsync(queueType, jobInfo2.GroupId, false, CancellationToken.None)).All(t => t.Status == JobStatus.Cancelled || t.Status == JobStatus.Failed || (t.Status == JobStatus.Running && t.CancelRequested))); | ||
jobInfo1 = await sqlQueueClient.GetJobByIdAsync(queueType, 1, false, CancellationToken.None); | ||
jobInfo2 = await sqlQueueClient.GetJobByIdAsync(queueType, 2, false, CancellationToken.None); |
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.
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.
Sorry, I will check and replace number with variable.
Hi! Please, sync this PR with main. |
Ok, I will sync this PR. |
@ccfromms Thanks for syncing with main :) I am wondering if this PR is still in draft or can be published as 'Ready for review'? |
Yes, this PR is ready for review. I have turned it open. Thanks! |
/azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
@ccfromms would you be able to update with main again? |
Ok, I will update it. |
This PR needs to be reviewed and probably updated. @EXPEkesheth I'll make a small story for next sprint to review this and get it merged. |
Description
While testing importOrchestratorJob, I discovered several issues in job tests. Essentially the issues are as following:
This PR will add several tests for OrchestratorJob and SqlQueueClient, and upgrade the function for TestQueueClient.
Testing
FHIR Team Checklist
Semver Change (docs)
Patch|Skip|Feature|Breaking (reason)