From 4fb010384c08f71ae06eff6dcce8d25ca77fdd0f Mon Sep 17 00:00:00 2001 From: Josh Date: Fri, 20 Feb 2026 23:57:14 -0500 Subject: [PATCH 1/2] test(DbHandler): make sure auto-increment is reset in between tests DELETE doesn't reset auto-increment; TRUNCATE does. Also probably faster. Signed-off-by: Josh --- apps/federation/tests/DbHandlerTest.php | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/apps/federation/tests/DbHandlerTest.php b/apps/federation/tests/DbHandlerTest.php index a812c28b6344d..f834e787360a7 100644 --- a/apps/federation/tests/DbHandlerTest.php +++ b/apps/federation/tests/DbHandlerTest.php @@ -43,9 +43,7 @@ protected function setUp(): void { } protected function tearDown(): void { - $query = $this->connection->getQueryBuilder()->delete($this->dbTable); - $query->executeStatement() - ; + $this->connection->truncateTable($this->dbTable); parent::tearDown(); } From 9b44f76a5f451d046a72d1f8f3cbe9b8f83aab80 Mon Sep 17 00:00:00 2001 From: Josh Date: Sat, 21 Feb 2026 09:56:32 -0500 Subject: [PATCH 2/2] chore: fixup Signed-off-by: Josh --- apps/federation/tests/DbHandlerTest.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/federation/tests/DbHandlerTest.php b/apps/federation/tests/DbHandlerTest.php index f834e787360a7..552d71fef3d56 100644 --- a/apps/federation/tests/DbHandlerTest.php +++ b/apps/federation/tests/DbHandlerTest.php @@ -43,7 +43,7 @@ protected function setUp(): void { } protected function tearDown(): void { - $this->connection->truncateTable($this->dbTable); + $this->connection->truncateTable($this->dbTable, false); parent::tearDown(); }