Skip to content

Conversation

@markekraus
Copy link
Contributor

@markekraus markekraus commented Sep 23, 2017

Unfortunately, there were some odd things coupled with this change that were all somewhat interdependent.

  • Adds Delay test to WebListener
  • Adds -TestValue parameter to Get-WebListenerUrl to support tests which take a value such as encoding, redirect, and delay
  • Adjusts existing tests for encoding and redirect to use -TestValue
  • Removes a repeated timeout test
  • Replaces httpbin.org/delay tests with Weblistener URL
  • Fixes the tests

I discovered in switching this that the URL's that were being used (e.g. http://httpbin.org/delay/:5) were actually pointing to a page that immediately returned a 505 error. The pages were not actually delayed and the web cmdlets were not actually timing out. The tests were passing, but they were checking for the wrong Error ID. I had to correct the error ID in all the tests.

Ironically, httpbin.org is having a ton of issues right now. I will push a feature tag later after they have stabilized. Feature tag pushed.

reference #2504

* Add TestValue Parameer to accomodate tests which take a value such as Redirect, Encoding and Delay
* Adjust existing tests to use TestValue parameter
@msftclas
Copy link

@markekraus,
Thanks for having already signed the Contribution License Agreement. Your agreement was validated by Microsoft. We will now review your pull request.
Thanks,
Microsoft Pull Request Bot

@daxian-dbw daxian-dbw assigned TravisEz13 and iSazonov and unassigned iSazonov Sep 25, 2017
Copy link
Member

@adityapatwardhan adityapatwardhan left a comment

Choose a reason for hiding this comment

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

LGTM

@TravisEz13 TravisEz13 merged commit b30da37 into PowerShell:master Sep 25, 2017
Returns the same results as the Get test. If a number is supplied, the server will wait that many seconds before returning a response. This can be used to test timeouts.

```powershell
Invoke-WebRequest -Uri 'http://localhost:8083/Delay/5'
Copy link
Contributor

@dantraMSFT dantraMSFT Sep 25, 2017

Choose a reason for hiding this comment

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

Most of the tests are using the Get-WebListenerUrl function. Suggest adding an example for that as well.

$uri = Get-WebListenerUrl -Test 'Delay' -TestValue '5' #Closed

Copy link
Contributor Author

@markekraus markekraus Sep 25, 2017

Choose a reason for hiding this comment

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

I will add those on the next iteration. Created #4918 to track. (pull was merged before i could update). #Closed

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.

6 participants