Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/mail.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristoph Wurst <christoph@winzerhof-wurst.at>2022-05-16 18:40:02 +0300
committerChristoph Wurst <christoph@winzerhof-wurst.at>2022-05-23 09:58:09 +0300
commit8d497484ce4e66127b6a93d875d177246da6f3ac (patch)
tree4e7c16d0aeca93b7c1fba47b0624acff17720c32 /tests/Integration
parent396805004ea1da8dc460c743a48b89575ab33ce1 (diff)
Prevent causal read for outbox message and recipient inserts
The message and the recipients are inserted in one transaction but the recipients are read another time outside a transaction. Read-write split database clusters might not be in full sync mode and then reading the recipients gives partial or no results. The insert will assign the primary key value to the recipient entities. Therefore we can skip reading the data. Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
Diffstat (limited to 'tests/Integration')
-rw-r--r--tests/Integration/Service/OutboxServiceIntegrationTest.php4
1 files changed, 1 insertions, 3 deletions
diff --git a/tests/Integration/Service/OutboxServiceIntegrationTest.php b/tests/Integration/Service/OutboxServiceIntegrationTest.php
index cbfa17c13..9386f97ea 100644
--- a/tests/Integration/Service/OutboxServiceIntegrationTest.php
+++ b/tests/Integration/Service/OutboxServiceIntegrationTest.php
@@ -160,9 +160,7 @@ class OutboxServiceIntegrationTest extends TestCase {
$this->assertNotEmpty($message->getRecipients());
$this->assertEmpty($message->getAttachments());
- $retrieved->resetUpdatedFields();
- $saved->resetUpdatedFields();
- $this->assertEquals($saved, $retrieved); // Assure both operations are identical
+ self::assertCount(1, $retrieved->getRecipients());
}
public function testSaveAndGetMessages(): void {