Skip to content
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

testutils.go always starts a new TestServer #3

Closed
oliver006 opened this issue Dec 8, 2017 · 3 comments
Closed

testutils.go always starts a new TestServer #3

oliver006 opened this issue Dec 8, 2017 · 3 comments

Comments

@oliver006
Copy link
Contributor

This section here:
https://github.com/plivo/plivo-go/blob/master/plivo/testutils.go#L21-L29
always starts a new TestServer, even in the context of a normal process.

This causes the process to fail on AppEngine as listening to a port is not allowed:

panic: httptest: failed to listen on a port: listen tcp6 [::1]:0: socket: operation not permitted
@plivo-sdks
Copy link
Contributor

@oliver006 We need that section of code to mock a test server so all tests pass. We will check if GAE allows setting up any local servers and get back to you. For the time being, you might want to skip running tests to bypass this issue.

@oliver006
Copy link
Contributor Author

oliver006 commented Dec 12, 2017

Sure, I understand why you need the test server but the problem is not running tests in GAE but running the http server process itself.
The test server 1) shouldn't be brought up in each and every process that uses the library, 2) shouldn't be a global variable and 3) should just be started for each iteration of a test.

@plivo-sdks
Copy link
Contributor

@oliver006 Thanks for PR. It is now merged into the project. Let me know if you are still facing this issue.

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

No branches or pull requests

2 participants