-
-
Notifications
You must be signed in to change notification settings - Fork 32k
gh-131178: add E2E mockless tests for http.server
command-line interface
#134279
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
Conversation
Ok, so the tests hang on macOS & Windows for some reason I'm not aware of. The tests are really more E2E tests but they can help catching possible issues so I'm keeping them. |
!buildbot ASAN |
Ok, since the build bots are struggling, I'll first remove the bits where we test the HTTP server. I'll try to see how we can reliably test this component later (I'm essentially applying PEP-11 recommendations when a Tier-1 bot is failing). |
…st-131178 # Conflicts: # Lib/test/test_httpservers.py
Ha!
So there is something happening! I'll continue investigating this. At least, I think I know why it failed on the build bots. Presumably, the address being served was incorrectly parsed for some reason (namely it wasn't 127.0.0.1 or there was some exception being raised that I wasn't aware of) |
!buildbot ASAN |
🤖 New build scheduled with the buildbot fleet by @picnixz for commit f735ee5 🤖 Results will be shown at: https://buildbot.python.org/all/#/grid?branch=refs%2Fpull%2F134279%2Fmerge The command will test the builders whose names match following regular expression: The builders matched are:
|
I tried to reproduce these problems locally based on the commit that cause the buildbot failed(commit hash 605022a) and It appears that both of the Here's my reproduction of these bugs
$ git reset --hard 605022aeb69ae19cae1c020a6993ab5c433ce907
$ ./configure --with-openssl=donotexist
# ...
$ make -j12
# ...
Could not build the ssl module!
Python requires a OpenSSL 1.1.1 or newer
$ ./python -m test test_httpservers -v
# ...
======================================================================
ERROR: test_http_client (test.test_httpservers.CommandLineRunTimeTestCase.test_http_client)
----------------------------------------------------------------------
# ...
AttributeError: 'NoneType' object has no attribute 'create_default_context'
======================================================================
FAIL: test_https_client (test.test_httpservers.CommandLineRunTimeTestCase.test_https_client)
----------------------------------------------------------------------
# ...
AssertionError: False is not true
---------------------------------------------------------------------- |
Ah thank you! this is something I couldn't understand as I couldn't show the traceback in full. Thank you very much for that. |
Actually, there is something else. The errors were: FAIL: test_https_client (test.test_httpservers.CommandLineRunTimeTestCase.test_https_client)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/Users/ec2-user/buildbot/buildarea/3.x.itamaro-macos-intel-aws.macos-with-brew.asan.nogil/build/Lib/test/test_httpservers.py", line 1533, in test_https_client
self.assertTrue(self.wait_for_server(proc, 'https', port, bind))
~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AssertionError: False is not true However, I've already disabled the test if |
!buildbot x86-64 MacOS Intel |
🤖 New build scheduled with the buildbot fleet by @picnixz for commit 7686f3a 🤖 Results will be shown at: https://buildbot.python.org/all/#/grid?branch=refs%2Fpull%2F134279%2Fmerge The command will test the builders whose names match following regular expression: The builders matched are:
|
Ok, I think I know what happened. When requesting Therefore, I think I can merge this one without worries. If build bot fails (I can't seem to run them), I'll revert the PR (again). But the failing build bots now succeed, so it should be fine. |
http.server
command-line interfacehttp.server
command-line interface
This is a fresh PR because I don't know why GHA is stuck. Locally it works, and I don't know why it now fails remotely.