Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
55 commits
Select commit Hold shift + click to select a range
419cdd8
Refactoring in DatabaseL2 for readability. Added TODOs and utils.
ndobromirov Dec 27, 2016
047851e
Kick-off on the L2 tests refactoring.
ndobromirov Dec 30, 2016
6b7a3f3
CS fixes.
ndobromirov Dec 30, 2016
43b389a
Fix code coverage. Added some docks.
ndobromirov Jan 2, 2017
e378fc7
Code coverage iteration.
ndobromirov Jan 2, 2017
d30b6da
Improved delete queue consistency to avoide reliance of other process…
ndobromirov Jan 4, 2017
b4f91c0
Implemented clean-up after write for the StaticL2 driver, so it will …
ndobromirov Jan 4, 2017
239cd11
Imrpved code reusage in DatabaseL2. Added docks to LX and L2 base cla…
ndobromirov Jan 4, 2017
e712eb6
Reflow of the integrated layer. Added some inline docks.
ndobromirov Jan 4, 2017
4f1d07f
DatabaseL2: single query to insert cache tags. Refactoring to increas…
ndobromirov Jan 4, 2017
0068125
Added new Entity::isExpired. Used it to strenghten the StaticL1::isNe…
ndobromirov Jan 4, 2017
f0b649f
Refactored SQLiteL1 sql statments for readability.
ndobromirov Jan 4, 2017
12cc277
Added a new test to validate L1::isNegativeCache consistency for all …
ndobromirov Jan 4, 2017
cb72108
Added a test for L2::applyEvents. Fixed incompatability in StaticL2 a…
ndobromirov Jan 5, 2017
cbba6dc
Implemented a dedicated L2::deleteTag test. Fixed StaticL2 interface …
ndobromirov Jan 5, 2017
3ddc2af
Removed code coverage ignore tags from 2 methods in StaticL2.
ndobromirov Jan 5, 2017
d530702
Moved shared logick from StaticL2 and DatabaseL2 to L2 abstract - the…
ndobromirov Jan 5, 2017
0ffea2d
Micro-optimisations. Re-ordered code in StaticL2 to match the Databas…
ndobromirov Jan 5, 2017
64a0285
Added a test for the L2 garbage collection related interfaces. Fixed …
ndobromirov Jan 6, 2017
82db81b
Improved consistency between StaticL2 and DatabaseL2. Performance imp…
ndobromirov Jan 6, 2017
ae09451
Disabled DatabaseL2::collectGarbage limit input for all SQLite storage.
ndobromirov Jan 6, 2017
6557519
Refactor the L2::collectGarbage test to enforce the correct API as mu…
ndobromirov Jan 6, 2017
05ef967
Audit the TODOs in code. Removed the ones that are not relevant anymore.
ndobromirov Jan 6, 2017
3b1372d
Improved the L2::applyEvents test.
ndobromirov Jan 6, 2017
79dd94b
API change. Separated the StateL1 creation from the L1 creation into …
ndobromirov Jan 6, 2017
32cd578
Added test coverage for all L1 state managers. Improved documentation…
ndobromirov Jan 6, 2017
8ffcade
Addres::isMatch micro optimisation.
ndobromirov Jan 6, 2017
0c2d48f
Refactor the tests for the state managers to have no cross-metod depe…
ndobromirov Jan 6, 2017
e53f381
Added groupings on state, L1 and L2 so test can be run partially.
ndobromirov Jan 7, 2017
4fe462f
Added combinatory tests to L1, so every L1 cache driver is tested aga…
ndobromirov Jan 7, 2017
6c84d85
Prepared the bases for the integrated layer tests.
ndobromirov Jan 8, 2017
e3650cf
Ported the tests: testNewPoolSynchronization.
ndobromirov Jan 8, 2017
5d3ce78
Ported the tombstone test for the integration layer.
ndobromirov Jan 8, 2017
ab5eb6b
Fixed integrated API regression.
ndobromirov Jan 8, 2017
06694ba
Fixed integrated API regression 2.
ndobromirov Jan 8, 2017
88d5e7a
L2: Clear whole pool api ported to new L2 tests structure.
ndobromirov Jan 8, 2017
8ea7445
L2: Ported L2 expiration test.
ndobromirov Jan 8, 2017
fd106ba
L2: Ported reread test.
ndobromirov Jan 8, 2017
8d38c2a
Ported pool sinchronization test. Improved the test to combine all po…
ndobromirov Jan 8, 2017
8d46d75
Integrated: Ported pool clear sinchronization test.
ndobromirov Jan 8, 2017
7bfe297
Integration: API addition getAddressesForTag(). Ported the testTagged…
ndobromirov Jan 8, 2017
bda8deb
Ported the test for broken DatabaseL2 used in the integration layer.
ndobromirov Jan 8, 2017
c4397c8
Integration: Ported the test - Sync with no writes.
ndobromirov Jan 8, 2017
f607675
Integrated: Ported the existence test.
ndobromirov Jan 8, 2017
9d56dfe
Integrated: Ported the poll value access test.
ndobromirov Jan 8, 2017
a34e97d
Integrated: Ported expiration test.
ndobromirov Jan 8, 2017
67512a1
Integrated: Ported excessive overhead skipping test.
ndobromirov Jan 8, 2017
ea61e23
Integrated: Ported hit-set-counter (key overhead) test.
ndobromirov Jan 8, 2017
501c951
Integrated: Ported the failed unserialization test.
ndobromirov Jan 8, 2017
8a5b9ca
Integrated: Ported the garbage colletion tests.
ndobromirov Jan 8, 2017
a5088a0
Integrated: Ported tests for wrong serialization cases. L1: Ported th…
ndobromirov Jan 8, 2017
8f937d7
Removed the LcacheTest class as obsolete (no tests are left in it).
ndobromirov Jan 8, 2017
a32dba5
Fixed code coverage (iteration 1).
ndobromirov Jan 8, 2017
52b2041
Fixed code coverage (iteration 2). Reverted the exception handling fo…
ndobromirov Jan 8, 2017
b9e4118
Fixed the Integrated API hacks. Moved them to the wrapper IntegratedM…
ndobromirov Jan 8, 2017
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,12 @@
"cbf": "phpcbf --standard=PSR2 -n src",
"api": "PATH=$HOME/bin:$PATH sami.phar --ansi update sami-config.php",
"sami-install": "mkdir -p $HOME/bin && curl --output $HOME/bin/sami.phar http://get.sensiolabs.org/sami.phar && chmod +x $HOME/bin/sami.phar",
"test": "phpunit"
"test": "phpunit",
"test-state": "phpunit --group state",
"test-l1": "phpunit --group L1",
"test-l2": "phpunit --group L2",
"test-integration": "phpunit --group integration",
"test-failing": "phpunit --group failing"
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was added, so when a new annotation is added to a test like:
@group failing
The composer test-failing command will trigger only that test.
Useful when debugging a single test.

},
"extra": {
"branch-alias": {
Expand Down
1 change: 0 additions & 1 deletion src/APCuL1.php
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,6 @@ public function delete($event_id, Address $address)
$localKey = $this->getLocalKey($address);

if ($address->isEntireCache() || $address->isEntireBin()) {
$localKey = $this->getLocalKey($address);
$pattern = '/^' . preg_quote($localKey) . '.*/';
$matching = $this->getIterator($pattern, APC_ITER_KEY);
assert(!is_null($matching), 'Iterator instantiation failed.');
Expand Down
8 changes: 6 additions & 2 deletions src/Address.php
Original file line number Diff line number Diff line change
Expand Up @@ -70,12 +70,16 @@ public function isEntireCache()
*/
public function isMatch(Address $address)
{
if (!is_null($address->getBin()) && !is_null($this->bin) && $address->getBin() !== $this->bin) {
$bin = $address->getBin();
if (!(null === $bin || null === $this->bin || $bin === $this->bin)) {
return false;
}
if (!is_null($address->getKey()) && !is_null($this->key) && $address->getKey() !== $this->key) {

$key = $address->getKey();
if (!(null === $key || null === $this->key || $key === $this->key)) {
return false;
}

return true;
}

Expand Down
Loading