Page MenuHomePhabricator

test_newpages_default sometimes fails on beta sites due to lack of new pages
Closed, ResolvedPublic

Description

24 feb 2017 on en.ws.beta: https://travis-ci.org/wikimedia/pywikibot-core/jobs/204884483#L2011
17 jun 2017 on zh.wp.beta: https://travis-ci.org/magul/pywikibot-core/jobs/244023949

The easiest fix here is to create a new page on the wiki in question.

We should adapt the test case to clarify how to resolve the issue in this case.

Event Timeline

Change 339810 had a related patch set uploaded (by Dalba):
pagegenerators_tests.py: Length of newpages can be zero

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

Change 339810 abandoned by Dalba:
pagegenerators_tests.py: Length of newpages can be zero

Reason:
I'll make a few edits on that wiki.

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

I made some edits for now, but this may happen again in few month if there are no other edits on that wiki.

valhallasw renamed this task from test_newpages_default is failing on beta wikisource to test_newpages_default sometimes fails on beta sites due to lack of new pages.Jun 17 2017, 6:41 PM
valhallasw reopened this task as Open.
valhallasw removed a project: Patch-For-Review.
valhallasw updated the task description. (Show Details)
valhallasw subscribed.

Added a new page on zh.wp.beta; this resolved the issue: https://travis-ci.org/magul/pywikibot-core/jobs/244040241#L1134

Dvorapa removed Dalba as the assignee of this task.
Dvorapa triaged this task as High priority.
Dvorapa moved this task from Backlog to Test failures on the Pywikibot-tests board.
Dvorapa added subscribers: Dvorapa, Stang.

Happening again:

https://travis-ci.org/wikimedia/pywikibot/jobs/428038956#L1336

As I said in T198722, I think we should look for a more permanent solution.
Also users may run tests on third-party wikis in which they can't make an edit...

I'm going to send a patch to disable the self.assertGreater(len(pages), 0, failure_message) assertion.

Change 460315 had a related patch set uploaded (by Dalba; owner: dalba):
[pywikibot/core@master] test_newpages_default: Do not assert for existance of new pages

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

Dalba removed Dalba as the assignee of this task.Sep 13 2018, 2:28 PM

Change 460315 abandoned by Dalba:
test_newpages_default: Do not assert for existence of new pages

Reason:
Leaving it for someone else to implement it as Xqt suggested.

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

Change 461927 had a related patch set uploaded (by Xqt; owner: Xqt):
[pywikibot/core@master] [test] test newpages on big wikis only

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

Change 461927 merged by jenkins-bot:
[pywikibot/core@master] [test] test newpages on big wikis only

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