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-21 08:30:28 +0200
commit9d471877ae066c088364b89609670e404edadb33 (patch)
treed63220e7bd4debe2e0711c188a3fb180510de7cf
parentb91585c37f061b9028f245feba8baae04bc1f79e (diff)
downloadnextcloud-server-backport/52932/stable31.tar.gz
nextcloud-server-backport/52932/stable31.zip
test: Speed up comments testbackport/52932/stable31
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 15961b029f5..450aab16e79 100644
--- a/tests/lib/Comments/ManagerTest.php
+++ b/tests/lib/Comments/ManagerTest.php
@@ -1099,6 +1099,7 @@ class ManagerTest extends TestCase {
* @return IComment[]
*/
private function proccessComments(array $data): array {
+ $this->connection->beginTransaction();
/** @var IComment[] */
$comments = [];
foreach ($data as $comment) {
@@ -1114,6 +1115,7 @@ class ManagerTest extends TestCase {
$comment = $this->testSave($message, $actorId, $verb, $parentId, $id);
$comments[$comment->getMessage() . '#' . $comment->getActorId()] = $comment;
}
+ $this->connection->commit();
return $comments;
}