Skip to content

Commit

Permalink
fixup! fixup! fixup! fixup! fix: Delete inactive sessions in one query
Browse files Browse the repository at this point in the history
  • Loading branch information
juliushaertl committed Jun 21, 2023
1 parent e4d4c3c commit 6817892
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion tests/unit/Db/SessionMapperTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -94,12 +94,19 @@ public function testDeleteInactiveWithoutSteps1010() {

self::assertCount(1010, $this->sessionMapper->findAll(1));

$a = $this->sessionMapper->findAll(1);
var_dump($a);
sleep(1);

\OC::$server->getDatabaseConnection()->beginTransaction();
$this->sessionMapper->deleteInactiveWithoutSteps(1);
$deleted = $this->sessionMapper->deleteInactiveWithoutSteps();
\OC::$server->getDatabaseConnection()->commit();

self::assertEquals(1010, $deleted);

$a = $this->sessionMapper->findAll(1);
var_dump($a);

self::assertCount(0, $this->sessionMapper->findAll(1));
}

Expand Down

0 comments on commit 6817892

Please sign in to comment.