mirror of https://github.com/pixelfed/pixelfed
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Add tests/Unit/SnowflakeServiceTest.php covering SnowflakeService::next() and byDate(). Datacenter/worker ids are pinned via config so ids are fully deterministic and the sequence behaviour is assertable rather than probabilistic. Regression coverage for the stale-sequence bug (duplicate seq on the first two ids -> UNIQUE constraint collisions): - first two ids use distinct sequence values - consecutive calls yield a strictly increasing sequence (1,2,3,...) - a 100-id burst minted in the same frozen millisecond is fully unique - an explicit reproduction contrasting old (1,1) vs fixed (1,2) sequences Also covers: datacenter/worker bit encoding, sequence wraparound at 4095, cache reseeding on missing/non-numeric counters, timestamp bit encoding, and byDate() delegation/ordering. Verified these fail on the pre-fix code (6 failing) and pass on the fix (14 passing). |
1 week ago | |
|---|---|---|
| .. | ||
| ActivityPub | 4 weeks ago | |
| Lexer | 4 weeks ago | |
| APAnnounceStrategyTest.php | 4 weeks ago | |
| ActivityPubTagObjectTest.php | 4 weeks ago | |
| BearcapTest.php | 4 weeks ago | |
| CryptoTest.php | 4 weeks ago | |
| CuratedOnboardingNotifyAdminTest.php | 2 weeks ago | |
| ExampleTest.php | 2 weeks ago | |
| OobAuthorizationTest.php | 2 weeks ago | |
| PurifierTest.php | 4 weeks ago | |
| RestrictedAccessMiddlewareTest.php | 4 weeks ago | |
| SnowflakeServiceTest.php | 1 week ago | |
| WebfingerTest.php | 4 weeks ago | |