Page MenuHomePhabricator

TestRepeatingGenerator fails on test2 wiki
Closed, ResolvedPublic

Description

=================================== FAILURES ===================================
________________ TestRepeatingGenerator.test_RepeatingGenerator ________________

self = <tests.pagegenerators_tests.TestRepeatingGenerator testMethod=test_RepeatingGenerator>

    def test_RepeatingGenerator(self):
        """Test RepeatingGenerator."""
        with suppress_warnings(category=DeprecationWarning):
            gen = pagegenerators.RepeatingGenerator(
                self.site.recentchanges,
                key_func=lambda x: x['revid'],
                sleep_duration=10,
                reverse=True,
                namespaces=[0],
                total=self.length)
>       items = list(gen)

tests/pagegenerators_tests.py:406: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
pywikibot/pagegenerators.py:2188: in RepeatingGenerator
    yield from reversed(list(filtered_generator()))
pywikibot/pagegenerators.py:2186: in filtered_generator
    pywikibot.sleep(sleep_duration)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

secs = 10

    def sleep(secs):
        """Suspend execution of the current thread for the given number of seconds.
    
        Drop this process from the throttle log if wait time is greater than
        30 seconds.
        """
        if secs >= 30:
            stopme()
>       time.sleep(secs)
E       Failed: Timeout >300.0s

pywikibot/__init__.py:1311: Failed
------------------------------ Captured log call -------------------------------
VERBOSE  pywiki:logging.py:103 Found 1 wikipedia:test2 processes running, including this one.

https://api.travis-ci.org/v3/job/715494867/log.txt

Event Timeline

Restricted Application added subscribers: pywikibot-bugs-list, Aklapper. · View Herald Transcript

Change 618780 had a related patch set uploaded (by Xqt; owner: Xqt):
[pywikibot/core@master] [tests] use en-wiki instead of test2 for RepeatingGenerator tests

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

Xqt triaged this task as High priority.Aug 6 2020, 4:24 PM
Xqt updated the task description. (Show Details)

Change 618780 merged by jenkins-bot:
[pywikibot/core@master] [tests] use en-wiki instead of test2 for RepeatingGenerator tests

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

Xqt claimed this task.