Skip to content
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

Agent - Fix last step action #827

Merged
merged 1 commit into from
Jun 20, 2019
Merged

Agent - Fix last step action #827

merged 1 commit into from
Jun 20, 2019

Conversation

abist
Copy link
Contributor

@abist abist commented Jun 14, 2019

Fixes microsoft/azuredatastudio#5896

Also turned strings to enums

Along with PR in ADS here - microsoft/azuredatastudio#6034

@coveralls
Copy link

Coverage Status

Coverage increased (+16.2%) to 76.314% when pulling 193733b on agent/newStep into 432e054 on master.

@@ -30,7 +30,7 @@ public static class AgentTestUtils
Id = 1,
JobName = job.Name,
StepName = stepName,
SubSystem = "T-SQL",
SubSystem = SqlServer.Management.Smo.Agent.AgentSubSystem.TransactSql,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would suggest adding a unit test that has a hardcoded list of all the currently known SMO enum types and verifying that the enum only contains those types so that we can catch newly added types ASAP (for both enums used here)

@@ -365,6 +365,12 @@ public StepCompletionAction FailureAction
}
return this.failureAction;
}
set
{
if (this.failureAction != value) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems a little silly to have this check but I guess if that's the pattern I don't have a huge issue with it...

@abist abist merged commit fc50913 into master Jun 20, 2019
@abist abist deleted the agent/newStep branch June 20, 2019 07:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

SQL Agent Jobs created using ADS aren't runnable without error
3 participants