Page MenuHomePhabricator

TestFlowHide.test_hide() of flow_edit_tests fails with timeout
Closed, DeclinedPublic

Description

Both subtets (Topic and Post) fails with TimeoutError. Here the result for the Topic subtest:

____________________ TestFlowHide.test_hide (flow='Topic') _____________________

self = <tests.flow_edit_tests.TestFlowHide testMethod=test_hide>

    def test_hide(self):
        """Hide and restore a test topic and post."""
        for flow in (self.topic, self.post):
            with self.subTest(flow=flow.__class__.__name__), \
>                self.restored(flow):

tests/flow_edit_tests.py:262: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
/opt/hostedtoolcache/Python/3.7.17/x64/lib/python3.7/contextlib.py:112: in __enter__
    return next(self.gen)
tests/flow_edit_tests.py:244: in restored
    flow.restore(MODERATION_REASON)
pywikibot/flow.py:320: in restore
    self.site.restore_topic(self, reason)
pywikibot/site/_decorators.py:93: in callee
    return fn(self, *args, **kwargs)
pywikibot/site/_decorators.py:62: in callee
    return fn(self, *args, **kwargs)
pywikibot/site/_extensions.py:652: in restore_topic
    return self.moderate_topic(page, 'restore', reason)
pywikibot/site/_decorators.py:93: in callee
    return fn(self, *args, **kwargs)
pywikibot/site/_decorators.py:62: in callee
    return fn(self, *args, **kwargs)
pywikibot/site/_extensions.py:569: in moderate_topic
    data = req.submit()
pywikibot/data/api/_requests.py:1059: in submit
    if self._internal_api_error(code, error.copy(), result):
pywikibot/data/api/_requests.py:917: in _internal_api_error
    self.wait()
pywikibot/data/api/_requests.py:960: in wait
    super().wait(delay)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = pywikibot.data.api._requests.Request<wikipedia:test->'/w/api.php?action=flow&page=Topic:Sl4svodmrhzmpjjh&submodule=mod...reason=Pywikibot+test&mtmoderationState=restore&maxlag=5&format=json&token=64a6523321b72d1d0a72a559154f0ceb66693721+\'>
delay = None

    def wait(self, delay: int | None = None) -> None:
        """Determine how long to wait after a failed request.
    
        :param delay: Minimum time in seconds to wait. Overwrites
            ``retry_wait`` variable if given. The delay doubles each
            retry until ``retry_max`` seconds is reached.
        """
        if not hasattr(self, 'max_retries'):
            self.max_retries = pywikibot.config.max_retries
    
        if not hasattr(self, 'retry_wait'):
            self.retry_wait = pywikibot.config.retry_wait
    
        if not hasattr(self, 'current_retries'):
            self.current_retries = 1
        else:
            self.current_retries += 1
    
        if self.current_retries > self.max_retries:
            raise pywikibot.exceptions.TimeoutError(
>               'Maximum retries attempted without success.')
E           pywikibot.exceptions.TimeoutError: Maximum retries attempted without success.

pywikibot/data/__init__.py:48: TimeoutError

Event Timeline

Xqt triaged this task as High priority.Jun 12 2024, 1:56 PM

Change #1044601 had a related patch set uploaded (by Xqt; author: Xqt):

[pywikibot/core@master] [tests] mark TestFlowHide.test_hide as expectedFailure

https://gerrit.wikimedia.org/r/1044601

Change #1044601 merged by jenkins-bot:

[pywikibot/core@master] [tests] mark TestFlowHide.test_hide as expectedFailure

https://gerrit.wikimedia.org/r/1044601

Structured Discussion was disabled on testwiki (T371112)