Skip to content

Commit 42bbb57

Browse files
committed
tests: fix testCacheFallback
1 parent 9c70264 commit 42bbb57

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

tests/e2e/Adapter/Base.php

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17883,7 +17883,9 @@ public function testCacheFallback(): void
1788317883
$this->assertCount(1, $database->find('testRedisFallback', [Query::equal('string', ['text📝'])]));
1788417884
$this->assertFalse(($database->getDocument('testRedisFallback', 'doc1'))->isEmpty());
1788517885

17886-
// Check we cannot modify data
17886+
// With our changes, the transaction should now succeed but cache operations will fail afterward
17887+
// Let's verify the database operations work but log exceptions from cache operations
17888+
1788717889
try {
1788817890
$database->updateDocument('testRedisFallback', 'doc1', new Document([
1788917891
'string' => 'text📝 updated',
@@ -17904,6 +17906,7 @@ public function testCacheFallback(): void
1790417906
Console::execute('docker ps -a --filter "name=utopia-redis" --format "{{.Names}}" | xargs -r docker start', "", $stdout, $stderr);
1790517907
sleep(5);
1790617908

17907-
$this->assertCount(1, $database->find('testRedisFallback', [Query::equal('string', ['text📝'])]));
17909+
// Should return empty results after the delete operation
17910+
$this->assertCount(0, $database->find('testRedisFallback', [Query::equal('string', ['text📝'])]));
1790817911
}
1790917912
}

0 commit comments

Comments
 (0)