Xqt created this task.
Xqt added projects: Pywikibot, Pywikibot-tests.
Restricted Application added subscribers: pywikibot-bugs-list, Aklapper.
TASK DESCRIPTION
**Steps to replicate the issue** (include links if applicable):
`pwb http_tests -v LiveFakeUserAgentTestCase `
**What happens?**:
======================================================================
ERROR: test_fetch_with_fake_useragent
(tests.http_tests.LiveFakeUserAgentTestCase)
Test method with fake_useragent module.
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/runner/work/pywikibot/pywikibot/tests/http_tests.py", line
302, in test_fetch_with_fake_useragent
self._test_fetch_use_fake_user_agent()
File "/home/runner/work/pywikibot/pywikibot/tests/http_tests.py", line
270, in _test_fetch_use_fake_user_agent
r = http.fetch(self.get_httpbin_url('/status/200'),
File "/home/runner/work/pywikibot/pywikibot/pywikibot/comms/http.py",
line 448, in fetch
callback(response)
File "/home/runner/work/pywikibot/pywikibot/pywikibot/comms/http.py",
line 344, in error_handling_callback
raise ServerError(
pywikibot.exceptions.ServerError: 502 Server Error: Bad Gateway
----------------------------------------------------------------------
======================================================================
ERROR: test_fetch (tests.http_tests.DataBodyParameterTestCase)
Test that using the data and body params produce same results.
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/runner/work/pywikibot/pywikibot/tests/http_tests.py", line
572, in test_fetch
data={'fish&chips': 'delicious'})
File "/home/runner/work/pywikibot/pywikibot/pywikibot/comms/http.py",
line 448, in fetch
callback(response)
File "/home/runner/work/pywikibot/pywikibot/pywikibot/comms/http.py",
line 340, in error_handling_callback
.format(urlparse(response.url).netloc))
pywikibot.exceptions.Server504Error: Server httpbin.org timed out
**What should have happened instead?**:
The test should be skipped. The `aspects.CheckHostnameMixin` class already
skips the tests within setUpClass when a response.status is not in
[
HTTPStatus.OK,
HTTPStatus.MOVED_PERMANENTLY,
HTTPStatus.FOUND,
HTTPStatus.SEE_OTHER,
HTTPStatus.TEMPORARY_REDIRECT,
HTTPStatus.PERMANENT_REDIRECT
]
but the gateway error can also occurr later in the tests
TASK DETAIL
https://phabricator.wikimedia.org/T335622
EMAIL PREFERENCES
https://phabricator.wikimedia.org/settings/panel/emailpreferences/
To: Xqt
Cc: Aklapper, Xqt, pywikibot-bugs-list, PotsdamLamb, Jyoo1011, JohnsonLee01,
SHEKH, Dijkstra, Khutuck, Zkhalido, Viztor, Wenyi, Tbscho, MayS, Framawiki,
Mdupont, JJMC89, Dvorapa, Altostratus, binbot, Avicennasis, mys_721tx, jayvdb,
Masti, Alchimista
_______________________________________________
pywikibot-bugs mailing list -- [email protected]
To unsubscribe send an email to [email protected]