wiki.techinc.nl/tests/phpunit/includes/filebackend
Tim Starling d23c174390 filebackend: Retry Swift requests with new auth token on 401
Every Wednesday, we get hundreds of user-visible storage failures,
because there is only one global storage token and it has a lifetime of
one week. The code assumes that requesting a token regularly will avoid
expiry, but that is not the case.

So, when a request fails with a 401, refresh the auth token, then retry
the request. Factor out HTTP request handling to allow this.

Swift gives us the remaining lifetime of the token in seconds, so use
that as the server and process cache expiry time. There will be a
stampede when it expires, but my laptop can do 700 req/s single-
threaded, so it should be OK.

Add tests to cover the cases previously handled by checking the return
value of getAuthentication().

Bug: T358830
Change-Id: If9fe4dde4127592adae1b81e8eb925c4f59443d9
2024-03-15 21:34:36 +00:00
..
lockmanager tests: Fix @covers and @coversDefaultClass to have leading \ 2024-02-16 22:43:56 +00:00
FileBackendGroupIntegrationTest.php tests: Fix @covers and @coversDefaultClass to have leading \ 2024-02-16 22:43:56 +00:00
FileBackendMultiWriteTest.php filebackend: Refactor FileBackendIntegrationTest 2024-03-14 20:27:25 +00:00
FileBackendStoreTest.php filebackend: Refactor FileBackendIntegrationTest 2024-03-14 20:27:25 +00:00
SwiftFileBackendTest.php filebackend: Retry Swift requests with new auth token on 401 2024-03-15 21:34:36 +00:00