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
Fix the issue about imcomplete input on powershell #15010
Conversation
@@ -32,6 +32,7 @@ sub run { | |||
$self->run_in_powershell(cmd => 'Get-NetIPAddress -InterfaceAlias $a.name', tags => 'win-remote-desktop'); | |||
$self->run_in_powershell(cmd => 'New-NetIPAddress -InterfaceAlias $a.name -IPAddress 10.0.2.18 -PrefixLength 24 -DefaultGateway 10.0.2.2 -Confirm:$false', tags => 'win-remote-desktop'); | |||
approve_network_popup; | |||
sleep 3; |
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.
wait_still_screen 3;
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.
sleep 3 is passed.
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.
I try to use wait_still_screen
2669594
to
7e8f4b3
Compare
@@ -32,6 +32,7 @@ sub run { | |||
$self->run_in_powershell(cmd => 'Get-NetIPAddress -InterfaceAlias $a.name', tags => 'win-remote-desktop'); | |||
$self->run_in_powershell(cmd => 'New-NetIPAddress -InterfaceAlias $a.name -IPAddress 10.0.2.18 -PrefixLength 24 -DefaultGateway 10.0.2.2 -Confirm:$false', tags => 'win-remote-desktop'); | |||
approve_network_popup; | |||
wait_still_screen 3; |
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.
LGTM, could you please add some comments here why you add 'sleep‘ here?
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.
Got it.
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.
Add some comments and tags.
7e8f4b3
to
5c9ed02
Compare
# Imcomplete input on powershell because executing command is too fast | ||
# Poo#109091 |
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.
Suggest change:
We may miss some characters due to type command too fast after network popup, so wait several seconds as a workaround,
See poo#109091
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.
updated.
Imcomplete input on powershell POO: https://progress.opensuse.org/issues/109091
5c9ed02
to
c5a7d52
Compare
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.
LGTM
@GraceWang571 |
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.
I see many test cases invoke run_in_powershell
, I'd like to say add wait_still_screen
in run_in_powershell
would be a better choice.
You know there might be similar failure when invoking run_in_powershell
without wait_still_screen
before OR in it.
@Wangqianzou there is typo in your subject and git commit message. typo: imcomplete - > incomplete |
Actually, I talked with Roy last week, and I had the same suggestion, however, for this single case, the issue was not related to powershell script, since the issue seems happen after: sub approve_network_popup { |
BTW, add wait_still_screen to |
I am afraid I can't agree with you. As you can see the As you might know, poo#109091 is a performance issue and can't be reproduced 100%. Our goal is to make the test code robust to avoid the failures caused by the possible performance. |
@Wangqianzou I would suggest you add the workaround into function And if you have seen any performance issue with |
@Wangqianzou You can close this PR once you back from vacation. |
Imcomplete input on powershell
POO: https://progress.opensuse.org/issues/109091