-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
Remove vsis3 test order dependency #4444
Remove vsis3 test order dependency #4444
Conversation
I can see some slowdown in the fact of starting and stopping the webserver for each test case: ~ 21.5 s now vs ~ 12.5 before. Couldn't the webserver be started once for all in a |
I'll have a look - I think I initially had that, undid it while working through the various issues, but those were mostly (entirely?) down to how the environment variables were being set. |
…ingle fixture, and to ensure the env vars are reset after each test
…ve test performance
The runtimes should now be back to what they were before. Looking at the test runtimes, I'm surprised that a couple of the local webserver tests are among the slowest. For example, |
ah, setting the CPL_CURL_VERBOSE=YES environment variable, I see the following traces
So we send a PUT request with a Expect: 100-continue header, but our server emulation doesn't emit it and just emits the HTTP/1.0 200 OK. The "Done waiting for 100-continue" must be a 1 s delay in curl in that situation. Probably that improving webserver.py/_process_req_resp() to emit the HTTP/1.1 100 Continue would fix this. I see in test_vsis3_4() that we have a custom handler function that does this. |
The Appveyor build failure has me confused. I can see it's failing on some tests modified by this PR, but I don't know what the important difference between the failing Appveyor build and the passing Github Windows builds is likely to be. |
I don't know either. I don't recall having seen flakes in those tests before (we have sometimes flakes on test_vsis3_sync_multithreaded_download or test_vsis3_sync_multithreaded_download_chunk_size) |
I've restarted the job and it still fails. One hypothesis would be that you modified the formatting of the XML response to be a multiline string, and perhaps git clone on that config uses CR-LF when checking it out files ? But there are other similar instances in other tests and they don't fail |
I've pushed a change to I had thought the Appveyor builds only started failing after the HTTP 100 change I made in webserver.py, so my next option is to try undoing that and see if it builds. The change I made could result in tests receiving HTTP 100 when they didn't before (if GDAL is sending |
yeah, that's a more likely cause. Actually I see that in master when we emit manually 100 continue, we do it in HTTP/1.1. But by default the webserver likely use HTTP/1.0 by default. Perhaps adding request.protocol_version = 'HTTP/1.1' in webserver.py would help ? (but I would expect the curl version used by the appveyor and github workflows to be the same) |
4831c51
to
fb6a785
Compare
The latest changes to set responses to HTTP 1.1 has caused a wide range of very odd test failures that differ by system. I've reverted this PR back to the state it was in before any changes regarding "100 Continue" responses, so it simply includes the test order dependency changes and linting. Pushing for a ~2s reduction in test runtime can wait for another day! |
Also remove duplicated definition of AWS_NO_SIGN_REQUEST in vsis3 test fixture
Thanks! |
What does this PR do?
Refactor gcore/vsis3.py to remove dependency on test order.
Refactor to apply environment variable overrides only during the test using now-standard test fixtures, rather than altering the global GDAL environment.
I apologise in advance that there are a ridiculous number of changes to appease flake8 - in retrospect, I wish I had done these first. If it's simply too much (and I suspect it is), options are:
What are related issues/pull requests?
#4407
Tasklist