generated from Nodarx/template
feat: track cache changes with sequence numbers and tombstones
Signed-off-by: Sebastian Krupinski <krupinski01@gmail.com>
This commit is contained in:
@@ -128,16 +128,18 @@ final class CacheSerializationTest extends TestCase
|
||||
->with(
|
||||
['sid' => 'svc', 'mailbox' => 'INBOX', 'uidValidity' => 7, 'uid' => 42],
|
||||
$this->callback(function (array $update): bool {
|
||||
$this->assertSame(['$set'], array_keys($update));
|
||||
$this->assertSame(['$set', '$setOnInsert'], array_keys($update));
|
||||
$this->assertSame('tenant', $update['$set']['tid']);
|
||||
$this->assertSame(7, $update['$set']['uidValidity']);
|
||||
$this->assertSame(5, $update['$set']['modSeq']);
|
||||
$this->assertSame(['addedSeq' => 5], $update['$setOnInsert']);
|
||||
$this->assertArrayNotHasKey('blobs', $update['$set']);
|
||||
return true;
|
||||
}),
|
||||
['upsert' => true],
|
||||
);
|
||||
|
||||
(new MessageStore($this->dataStore($collection)))->upsert('tenant', 'svc', 7, $this->entity());
|
||||
(new MessageStore($this->dataStore($collection)))->upsert('tenant', 'svc', 7, $this->entity(), 5);
|
||||
}
|
||||
|
||||
public function testMailboxStoreUpsertLeavesHarmonizationState(): void
|
||||
|
||||
Reference in New Issue
Block a user