| valhallasw added subscribers: Dalba, valhallasw. valhallasw added a comment. |
Is this patch supposed to resolve T92856/T153501 or is it a WIP? Because I do not see how disabling the cache will resolve the issue. Here is what is happening in T153501:
- The test suite fetches the list of main page templates (in any namespace) through the API.
- In the meanwhile a user makes an edit on the main page that adds Template:X to the main page.
- Test suite fetches the list of templates in the template namespace only.
- There will be an AssertionError because Template:X is found in the list templates in step 3, but not in in the list of step 1. All of these steps may happen – no matter if the cache is disabled or not.
I'm well aware that there is still a potential for race conditions when the cache has been disabled. However, it becomes severely limited because the race condition now has to happen between the two requests on the same line:
self.assertTrue(set(mysite.pagetemplates(mainpage)).issuperset( > set(mysite.pagetemplates(mainpage, namespaces=[10]))))
rather than (potentially) two different test functions that are executed at completely different times. That doesn't seem to be the case here (although test_API_limits_with_site_methods and testLinkMethods both call mysite.pagetemplates, they do so with slightly different parameters), but this does seem to be the case for T92856 (pagelinks is used all over the place).
Cc: valhallasw, Dalba, gerritbot, pywikibot-bugs-list, Aklapper, jayvdb, Magul, Adik2382, Th3d3v1ls, Ramalepe, Liugev6, Tbscho, MayS, Lewizho99, Mdupont, JJMC89, Maathavan, Avicennasis, Masti, Alchimista, Rxy
_______________________________________________ pywikibot-bugs mailing list [email protected] https://lists.wikimedia.org/mailman/listinfo/pywikibot-bugs
