diff options
author | Christoph Wurst <christoph@winzerhof-wurst.at> | 2021-06-15 18:55:12 +0300 |
---|---|---|
committer | Christoph Wurst <christoph@winzerhof-wurst.at> | 2021-06-15 19:28:40 +0300 |
commit | 8d207e91217b0f397572ad46ee7bc71a4105c988 (patch) | |
tree | 73e072e9f1d98a319ab7a020a41fc27424654709 /tests | |
parent | cf8875479228e08ec4edb04a26ef3f271f077fd2 (diff) |
Lower the chunk size for IMAP syncs
In #3110 I lowered the chances of too long IMAP commands by splitting
the sync process.
As we've seen in production it's still possible that certain accounts
run into the issue that their chunked UID list is producing an IMAP
command that is too long. So I'm once again lower the chances by
lowering the chunk size.
This could have a tiny effect on sync performance as it now takes more
chunks to check for the changed/vanished messages of one account.
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/Unit/IMAP/Sync/SynchronizerTest.php | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/Unit/IMAP/Sync/SynchronizerTest.php b/tests/Unit/IMAP/Sync/SynchronizerTest.php index 789cfcc14..7820aa2b1 100644 --- a/tests/Unit/IMAP/Sync/SynchronizerTest.php +++ b/tests/Unit/IMAP/Sync/SynchronizerTest.php @@ -52,7 +52,7 @@ class SynchronizerTest extends TestCase { $this->synchronizer = new Synchronizer($this->mapper); } - public function testSync() { + public function testSync(): void { $imapClient = $this->createMock(Horde_Imap_Client_Base::class); $request = $this->createMock(Request::class); $request->expects($this->any()) @@ -87,7 +87,7 @@ class SynchronizerTest extends TestCase { $this->assertEquals($expected, $response); } - public function testSyncChunked() { + public function testSyncChunked(): void { $imapClient = $this->createMock(Horde_Imap_Client_Base::class); $request = $this->createMock(Request::class); $request->method('getMailbox') @@ -97,7 +97,7 @@ class SynchronizerTest extends TestCase { $request->method('getUids') ->willReturn(range(1, 30000, 1)); $hordeSync = $this->createMock(Horde_Imap_Client_Data_Sync::class); - $imapClient->expects($this->exactly(2)) + $imapClient->expects($this->exactly(3)) ->method('sync') ->with($this->equalTo(new Horde_Imap_Client_Mailbox('inbox')), $this->equalTo('123456')) ->willReturn($hordeSync); |