You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 5d8595e
Browse filesBrowse the repository at this point in the historyBrowse files
test(documents): share one uncached twin across the document cache tests
DocumentCacheActivationTest, DocumentCacheEpochTest, DocumentCacheRoundTripTest
and InvalidationRestoreFailureTest each built their own copy of a database over
the same adapter, authorization and namespace with a None cache, used to change
stored data behind the cache under test. The copies had already drifted in
shape (a void updater with fixed or free arguments, a factory taking the
adapter separately, an inline block), so a fix to one would not reach the
others. Tests\Unit\Support\UncachedTwin::of() is now the single
implementation and each test writes through it directly.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
$this->assertSame('changed', $first->getDocument(self::COLLECTION, 'hook')->getAttribute('name'), 'no read is cached while the second writer is in flight');
61
61
});
62
62
@@ -66,16 +66,6 @@ public function testAWriterActivatingWhileAnotherIsInFlightLeavesItsBarrierInPla
66
66
$this->assertSame(0, $firstAdapter->documentReads, 'caching resumes once no writer is in flight');
$this->assertSame('original', $database->getDocument('webhooks', 'hook')->getAttribute('name'), 'A document written without this cache leaves the cached copy in place');
$this->assertSame('changed', $database->getDocument('webhooks', 'hook')->getAttribute('name'), 'A collection whose write has not activated stays uncached while the write is younger than the writer timeout');
444
434
445
435
$database->setCacheWriterTimeout(0);
@@ -467,7 +457,7 @@ public function testAWriteAfterAnAbandonedWriteReenablesTheCollection(): void
$this->assertSame('changed', $database->getDocument('webhooks', 'hook')->getAttribute('name'), 'A write younger than the writer timeout counts as in flight, so the next write leaves the collection uncached');
$this->assertTrue($database->getCollection('webhooks')->getAttribute('documentSecurity'), 'A definition written without this cache leaves the cached definition in place');
@@ -273,10 +273,10 @@ public function testPurgingTheMetadataCollectionRetiresEveryCachedDefinition():
$this->assertSame('changed', $database->getDocument(self::COLLECTION, 'kept')->getAttribute('entry'), 'a restore that failed leaves the document cache fail-closed');
0 commit comments