@justinvelluppillai opened this Pull Request on August 25th 2021 Contributor

Description:

Delete plugin invalidations that are ignored because a newer archive exists, otherwise invalidations get stuck there indefinitely.

Review

@justinvelluppillai commented on August 25th 2021 Contributor

Fixes #17752

@diosmosis commented on August 25th 2021 Member

The code looks good. A test for this could be added to QueueConsumerTest (or an existing test modified).

Most of those tests work the same way, they:

  1. setup the QueueConsumer instance
  2. insert some archive_invalidations entries
  3. then select everything through the QueueConsumer instance, collecting the invalidations in an array
  4. and check that the result of that array equals a hardcoded expected value

You could add some invalidations to an existing test (ie, add a plugin invalidation for date/period, then add a recent archive 'done' row so it thinks there's a usable archive (note Date::$now can be set to make it seem recent), and check that it is both not selected and deleted afterwards). You can also do this in a new test by copy-pasting test_invalidateConsumeOrder() and changing $invalidations and $expectedInvalidationsFound, and adding the extra archive row insertion.

@diosmosis commented on August 27th 2021 Member

Sorry, github notifications said my review was requested, but i think that might have been the original request.

This Pull Request was closed on August 29th 2021
Powered by GitHub Issue Mirror