Repository navigation
Conversation
The negative TTL tests passed only because Mockery threw BadMethodCallException, a LogicException, on the unexpected RPC call; with zend.assertions=1 they failed with AssertionError, and the lockRead one called lock(). They now expect the AssertionError and run with assertions enabled in CI. Two skipped tests document bugs: a negative TTL never throws the documented InvalidArgumentException, and a DateInterval TTL loses everything but its seconds field. Assisted-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars. ⚙️ Run configuration
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Raises test coverage and makes the negative TTL tests check what
Lockactually does. No changes insrc.Tests
UuidLockIdGeneratorwas never loaded by the suite before. Testo reports 43 → 48 tests.UuidLockIdGenerator(default factory yields distinct UUID v4 ids, an injected factory is used) andLockfalling back to it when no id is given.LogicException, which Mockery'sBadMethodCallExceptionfor the unexpected RPC call satisfies, and failed withAssertionErrorunderzend.assertions=1; thelockReadone calledlock(). They are now one data-driven test expectingAssertionError, skipped when assertions are off. The testo workflow passeszend.assertions=1so CI runs it.Bugs found (skipped tests, not fixed here)
A negative
ttl/waitTTLis only checked byassert(). The docblocks promise\InvalidArgumentException; in production (zend.assertions=-1) the negative value is sent to RoadRunner.convertTimeToMicroseconds()reads only the seconds field of a\DateInterval(format('%s')):PT1M30Sbecomes 30 s,PT1HandP1Dbecome 0 (forever), microseconds are dropped.How was this tested:
zend.assertions1 and -1), psalm and php-cs-fixer run locally (PHP 8.4, Windows)