Fix failing AppVeyor Python2.7 tests #985
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes issue #:
#965
Description of the changes being introduced by the pull request:
Since #885 the tests in TestUpdater and TestKeyRevocation fail on Appveyor Python 2.7 builds. After some live debugging, it turns out that the tests fail due to the extra amount of http requests to the simple http server (see tests/simple_server.py) that were added in #885.
The simple server runs in a subprocess and is re-used for the entire TestCase. After a certain amount of requests it becomes unresponsive. Note that neither the subprocess exits (ps -W), nor does the port get closed (netstat -a). It just doesn't serve the request, making it time out and fail the test.
The following script can be used to reproduce the issue (run in tests directory):
It fails repeatedly on the 69th request, but only if
stderr=subprocess.PIPE
is passed to Popen. Given that for each request the simple server writes about ~60 characters to stderr, e.g.... it looks a lot like a full pipe buffer of size 4096. Note that the
bufsize
argument to Popen does not change anything.As a simple workaround we silence the test server on Windows/Python2 to not fill the buffer.
Please verify and check that the pull request fulfills the following
requirements: