Skip to content

Fix Delay Test Race Condition #5035

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

Merged
merged 3 commits into from
Oct 6, 2017
Merged

Conversation

markekraus
Copy link
Contributor

Race condition where WebListener is answering fast enough for the timeout not to trigger. Address CI issues in #4937 expands work from #5005 to other tests.

example: https://travis-ci.org/PowerShell/PowerShell/jobs/284145590

@@ -551,7 +551,7 @@ Describe "Invoke-WebRequest tests" -Tags "Feature" {
It "Validate Invoke-WebRequest error with -Proxy option set - '<name>'" -TestCases $testCase {
param($proxy_address, $name, $protocol)

$uri = Get-WebListenerUrl -Test 'Delay' -TestValue '5' -Https:$($protocol -eq 'https')
$uri = Get-WebListenerUrl -Test 'Delay' -TestValue '6' -Https:$($protocol -eq 'https')
$command = "Invoke-WebRequest -Uri '$uri' -TimeoutSec 5 -Proxy '${proxy_address}' -SkipCertificateCheck"
Copy link
Member

Choose a reason for hiding this comment

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

Since it appears that this test expects a timeout to happen, should we make timeoutsec less? like 2 seconds?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@SteveL-MSFT I'm good with that. I will modify your previous change as well so they are all on the same settings. Are you thinking the -TestValue '5' and the -TimeoutSec 2?

Copy link
Member

Choose a reason for hiding this comment

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

I think delay of 5 and timeout of 2 makes sense

@daxian-dbw daxian-dbw merged commit 97ee17c into PowerShell:master Oct 6, 2017
@markekraus markekraus deleted the FixDelayTests branch January 19, 2018 18:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants