diff options
author | Christoph Wurst <christoph@winzerhof-wurst.at> | 2022-05-12 11:32:40 +0300 |
---|---|---|
committer | Christoph Wurst <christoph@winzerhof-wurst.at> | 2022-05-12 11:32:40 +0300 |
commit | bb65df12447e3f9d1807ab196c02d740de7edf4c (patch) | |
tree | caadc0160f077f03adc1c1d5605f0e6e750ed7c9 /tests | |
parent | 16e79219fa2d7bb01a26aad157e30aa1cdf5b2a0 (diff) |
Add more detailed performance logging to occ sync
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/Unit/IMAP/MessageMapperTest.php | 21 |
1 files changed, 16 insertions, 5 deletions
diff --git a/tests/Unit/IMAP/MessageMapperTest.php b/tests/Unit/IMAP/MessageMapperTest.php index 74bef763c..78b054eda 100644 --- a/tests/Unit/IMAP/MessageMapperTest.php +++ b/tests/Unit/IMAP/MessageMapperTest.php @@ -33,6 +33,7 @@ use Horde_Imap_Client_Socket; use OCA\Mail\Db\Mailbox; use OCA\Mail\IMAP\MessageMapper; use OCA\Mail\Model\IMAPMessage; +use OCA\Mail\Support\PerformanceLoggerTask; use PHPUnit\Framework\MockObject\MockObject; use Psr\Log\LoggerInterface; use function range; @@ -114,7 +115,9 @@ class MessageMapperTest extends TestCase { $client, $mailbox, 5000, - 0 + 0, + $this->createMock(LoggerInterface::class), + $this->createMock(PerformanceLoggerTask::class) ); $this->assertSame( @@ -183,7 +186,9 @@ class MessageMapperTest extends TestCase { $client, $mailbox, 5000, - 0 + 0, + $this->createMock(LoggerInterface::class), + $this->createMock(PerformanceLoggerTask::class) ); self::assertTrue($result['all']); @@ -245,7 +250,9 @@ class MessageMapperTest extends TestCase { $client, $mailbox, 5000, - 300 + 300, + $this->createMock(LoggerInterface::class), + $this->createMock(PerformanceLoggerTask::class) ); self::assertTrue($result['all']); @@ -314,7 +321,9 @@ class MessageMapperTest extends TestCase { $client, $mailbox, 5000, - 92000 + 92000, + $this->createMock(LoggerInterface::class), + $this->createMock(PerformanceLoggerTask::class) ); // This chunk returns 8k messages, when we only expected 5k. So the process @@ -353,7 +362,9 @@ class MessageMapperTest extends TestCase { $client, $mailbox, 5000, - 99999 + 99999, + $this->createMock(LoggerInterface::class), + $this->createMock(PerformanceLoggerTask::class) ); self::assertTrue($result['all']); |