Skip to content

Conversation

@vthiebaut10
Copy link
Collaborator

PR Summary

PR Context

@vthiebaut10 vthiebaut10 changed the title Add pester test for UnusedConnectionTimeout [WiP] Add pester test for UnusedConnectionTimeout Feb 10, 2023

# Start SSH process with Remote Forwarding Option to create a connection that doesn't prevent "Unused Connection Timeout"
$p = Start-Process -FilePath ssh -ArgumentList "-p $port -N -T -R 35000 $localuser1@$server" -PassThru
Wait-Process $p.Id -Timeout 10 -ErrorAction SilentlyContinue -ErrorVariable timeouted

Choose a reason for hiding this comment

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

We usually put a wait action in a retry loop, so that the test will finish quicker if the timeout is around the expected 2 minutes (seconds?). The retry loop will retry to up to a maximum time to wait. Also we should try to let the test finish as soon as possible, is the 2 2 minutes or seconds?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

It's 2 seconds

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants