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

[Smoketest]Add try 3 times with 30s sleeping time #17848

Merged
merged 5 commits into from
Apr 28, 2022

Conversation

lijinpei2008
Copy link
Contributor

Description

Add try 3 times with 30s sleeping time between each try.

Checklist

  • I have read the Submitting Changes section of CONTRIBUTING.md
  • The title of the PR is clear and informative
  • The appropriate ChangeLog.md file(s) has been updated:
    • For any service, the ChangeLog.md file can be found at src/{{SERVICE}}/{{SERVICE}}/ChangeLog.md
    • A snippet outlining the change(s) made in the PR should be written under the ## Upcoming Release header -- no new version header should be added
  • The PR does not introduce breaking changes
  • If applicable, the changes made in the PR have proper test coverage
  • For public API changes to cmdlets:
    • a cmdlet design review was approved for the changes in this repository (Microsoft internal only)
      • {Please put the link here}
    • the markdown help files have been regenerated using the commands listed here

@lijinpei2008 lijinpei2008 linked an issue Apr 19, 2022 that may be closed by this pull request
@isra-fel
Copy link
Member

Have you tested it?

@lijinpei2008
Copy link
Contributor Author

Have you tested it?

Yes, passed the test locally whether it's PowerShell or Windows Powershell.

@isra-fel
Copy link
Member

How about the negative case: you deliberately make a test case fail and check:

  1. if the error message contains meaningful info (like exception message and stack trace)
  2. if the case is retried

@lijinpei2008
Copy link
Contributor Author

How about the negative case: you deliberately make a test case fail and check:

  1. if the error message contains meaningful info (like exception message and stack trace)
  2. if the case is retried

Yes, change the value of the environment variable "$ErrorActionPreference" to "Continue" when the command runs incorrectly and retry.
If it succeeds, it skips. If the error continues, and the error message is printed on the screen. This behavior will continue 2 times.
For example, when I provide a wrong parameter, I can see an explicit error message telling me that the parameter "Names" does not exist.

Copy link
Member

@isra-fel isra-fel left a comment

Choose a reason for hiding this comment

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

LGTM

@isra-fel isra-fel merged commit 01237a7 into main Apr 28, 2022
@isra-fel isra-fel deleted the feature/smoketestimprovements branch April 28, 2022 07:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Eng]: Smoke test improvements
3 participants