mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-22 12:50:22 -07:00
win_wait_for: fix tests after attempts change (#35026)
This commit is contained in:
parent
f0134079e3
commit
630ae01f91
3 changed files with 24 additions and 24 deletions
|
@ -136,7 +136,7 @@ if ($path -eq $null -and $port -eq $null -and $state -eq "drained") {
|
|||
|
||||
if ($complete -eq $false) {
|
||||
$elapsed_seconds = ((Get-Date) - $module_start).TotalSeconds
|
||||
$result.attempts = $attempts
|
||||
$result.wait_attempts = $attempts
|
||||
$result.elapsed = $elapsed_seconds
|
||||
if ($search_regex -eq $null) {
|
||||
Fail-Json $result "timeout while waiting for file $path to be present"
|
||||
|
@ -168,7 +168,7 @@ if ($path -eq $null -and $port -eq $null -and $state -eq "drained") {
|
|||
|
||||
if ($complete -eq $false) {
|
||||
$elapsed_seconds = ((Get-Date) - $module_start).TotalSeconds
|
||||
$result.attempts = $attempts
|
||||
$result.wait_attempts = $attempts
|
||||
$result.elapsed = $elapsed_seconds
|
||||
if ($search_regex -eq $null) {
|
||||
Fail-Json $result "timeout while waiting for file $path to be absent"
|
||||
|
@ -195,7 +195,7 @@ if ($path -eq $null -and $port -eq $null -and $state -eq "drained") {
|
|||
|
||||
if ($complete -eq $false) {
|
||||
$elapsed_seconds = ((Get-Date) - $module_start).TotalSeconds
|
||||
$result.attempts = $attempts
|
||||
$result.wait_attempts = $attempts
|
||||
$result.elapsed = $elapsed_seconds
|
||||
Fail-Json $result "timeout while waiting for $($hostname):$port to start listening"
|
||||
}
|
||||
|
@ -216,7 +216,7 @@ if ($path -eq $null -and $port -eq $null -and $state -eq "drained") {
|
|||
|
||||
if ($complete -eq $false) {
|
||||
$elapsed_seconds = ((Get-Date) - $module_start).TotalSeconds
|
||||
$result.attempts = $attempts
|
||||
$result.wait_attempts = $attempts
|
||||
$result.elapsed = $elapsed_seconds
|
||||
Fail-Json $result "timeout while waiting for $($hostname):$port to stop listening"
|
||||
}
|
||||
|
@ -257,14 +257,14 @@ if ($path -eq $null -and $port -eq $null -and $state -eq "drained") {
|
|||
|
||||
if ($complete -eq $false) {
|
||||
$elapsed_seconds = ((Get-Date) - $module_start).TotalSeconds
|
||||
$result.attempts = $attempts
|
||||
$result.wait_attempts = $attempts
|
||||
$result.elapsed = $elapsed_seconds
|
||||
Fail-Json $result "timeout while waiting for $($hostname):$port to drain"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$result.attempts = $attempts
|
||||
$result.wait_attempts = $attempts
|
||||
$result.elapsed = ((Get-Date) - $module_start).TotalSeconds
|
||||
|
||||
Exit-Json $result
|
||||
|
|
|
@ -127,7 +127,7 @@ EXAMPLES = r'''
|
|||
'''
|
||||
|
||||
RETURN = r'''
|
||||
attempts:
|
||||
wait_attempts:
|
||||
description: The number of attempts to poll the file or port before module
|
||||
finishes.
|
||||
returned: always
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue