aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoas Schilling <coding@schilljs.com>2025-05-17 16:44:22 +0200
committerJoas Schilling <coding@schilljs.com>2025-05-17 16:44:22 +0200
commitae5fd3183d00373a6446f89eb0d1fa483c132fed (patch)
tree66822b1ddc8023c5d179bfd5a550a4ac7ebb2337
parent0c2934e885f77284b2923dcf6a43d0f39727c2c3 (diff)
downloadnextcloud-server-tests/noid/speed-up-comments-test.tar.gz
nextcloud-server-tests/noid/speed-up-comments-test.zip
test: Speed up comments testtests/noid/speed-up-comments-test
Signed-off-by: Joas Schilling <coding@schilljs.com>
-rw-r--r--tests/lib/Comments/ManagerTest.php2
1 files changed, 2 insertions, 0 deletions
diff --git a/tests/lib/Comments/ManagerTest.php b/tests/lib/Comments/ManagerTest.php
index fb2f913f291..86e70c56026 100644
--- a/tests/lib/Comments/ManagerTest.php
+++ b/tests/lib/Comments/ManagerTest.php
@@ -1073,6 +1073,7 @@ class ManagerTest extends TestCase {
* @return array<string, IComment>
*/
private function proccessComments(array $data): array {
+ $this->connection->beginTransaction();
/** @var array<string, IComment> $comments */
$comments = [];
foreach ($data as $comment) {
@@ -1088,6 +1089,7 @@ class ManagerTest extends TestCase {
$comment = $this->testSave($message, $actorId, $verb, $parentId, $id);
$comments[$comment->getMessage() . '#' . $comment->getActorId()] = $comment;
}
+ $this->connection->commit();
return $comments;
}