Commit graph

9 commits

Author SHA1 Message Date
Aaron Schulz
69ad84cf36 Make MapCacheLRU::get() accept a default value and improve $maxAge default
Change-Id: If562e1745ffed37b0f1ed5382a5a397fc68aac8e
2019-07-10 22:27:51 +00:00
Legoktm
4e35134f7a Revert "Separate MediaWiki unit and integration tests"
This reverts commit 0a2b996278.

Reason for revert: Broke postgres tests.

Change-Id: I27d8e0c807ad5f0748b9611a4f3df84cc213fbe1
2019-06-13 23:00:08 +00:00
Máté Szabó
0a2b996278 Separate MediaWiki unit and integration tests
This changeset implements T89432 and related tickets and is based on exploration
done at the Prague Hackathon. The goal is to identify tests in MediaWiki core
that can be run without having to install & configure MediaWiki and its dependencies,
and provide a way to execute these tests via the standard phpunit entry point,
allowing for faster development and integration with existing tooling like IDEs.

The initial set of tests that met these criteria were identified using the work Amir did in
I88822667693d9e00ac3d4639c87bc24e5083e5e8. These tests were then moved into a new subdirectory
under phpunit/ and organized into a separate test suite. The environment for this suite
is set up via a PHPUnit bootstrap file without a custom entry point.

You can execute these tests by running:
$ vendor/bin/phpunit -d memory_limit=512M -c tests/phpunit/unit-tests.xml

Bug: T89432
Bug: T87781
Bug: T84948
Change-Id: Iad01033a0548afd4d2a6f2c1ef6fcc9debf72c0d
2019-06-13 22:56:31 +02:00
Aaron Schulz
39a63a3c16 Make MapCacheLRU throw errors for bad $field arguments
Change-Id: Ibde33e0ff671d3428b73c66766478f58763726e1
2018-08-14 00:41:33 +00:00
Aaron Schulz
031a4c747e Add $maxAge parameter to MapCacheLRU get() and getField() methods
Change-Id: I2dee1ad3a5b4f2ef8c182e3466812777a9a9cf7f
2018-07-18 18:08:53 +00:00
Aaron Schulz
1f2b2f3f8d Add key expiration and map resizing support to MapCacheLRU
Also implement Serializable in to add stability to anything that
uses naïve serialization (such as for persistent caching).

Change-Id: I03ba654ffd80ba027d47d5d7583abfe48d52818d
2018-06-28 05:53:42 +00:00
Umherirrender
63d96c15fd build: Updating mediawiki/mediawiki-codesniffer to 16.0.0
Change-Id: I59b59f79bbf3ce4feff3b3a20c1c31bc16370531
2018-02-17 13:29:13 +01:00
Kunal Mehta
75160bdd3b Use MediaWikiCoversValidator for tests that don't use MediaWikiTestCase
Change-Id: I8c4de7e9c72c9969088666007b54c6fd23f6cc13
2018-01-01 08:28:02 +00:00
Aaron Schulz
01307b2cc9 Allow two-queue style insertion in MapCacheLRU
Change-Id: I1cd98ea8965b51e43371efd990fb9302bb507928
2017-09-25 21:28:38 +00:00