Merge pull request #53021 from nextcloud/backport/52932/stable31

[stable31] test: Speed up comments test
This commit is contained in:
Joas Schilling 2025-05-22 13:13:09 +02:00 committed by GitHub
commit 64cb674f63
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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;
}