-
Notifications
You must be signed in to change notification settings - Fork 851
[SSH] Fix SSH login session limit test case randomly failed issue. #5426 #5516
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
Conversation
tests/ssh/test_ssh_limit.py
Outdated
# run update template command and wait for template updated | ||
config_file_content = [] | ||
while len(config_file_content) == 0: | ||
stdin, stdout, stderr = admin_session.exec_command(LIMITS_CONF_TEMPLATE.format(hwsku, type, additional_content, template_path)) |
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.
This command sometimes will fail without error. can only randomly reproduce on testbed KVM.
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.
Re-run few times, all test passed:
ssh/test_ssh_limit.py::test_ssh_limits[] PASSED [100%]
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.
Could you explain in details "This command sometimes will fail without error" in PR description? If there is no error, why bothering fix.
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.
Fixed by remove the tee command. also decription updated.
The UT randomly failed because the template file not update, I found somestackover folow discussion about tee command will exist early when receive pipeline close signel.
This pull request introduces 3 alerts when merging b598111 into 85e608b - view on LGTM.com new alerts:
|
/azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
/azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
/azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
/azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
Description of PR
Type of change
Back port request
Approach
What is the motivation for this PR?
Fix SSH login session limit test case randomly failed issue.
How did you do it?
Code change:
1. Not use tee command to update template file in template folder.
2. Create template file with pipeline in home folder and move to template folder.
How did you verify/test it?
Run new UT make sure they are all pass.
Make sure all current UT not break during merge validation.
Any platform specific information?
N/A
Supported testbed topology if it's a new test case?