Skip to content

Commit

Permalink
Cleanup testcase and comments
Browse files Browse the repository at this point in the history
  • Loading branch information
tomneedham committed Sep 20, 2017
1 parent 4c15721 commit cea1009
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
4 changes: 2 additions & 2 deletions tests/lib/Repair/RepairMismatchFileCachePathTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -599,7 +599,7 @@ public function testRepairDetachedSubtree() {

// orphaned entry reattached
$entry = $this->getFileCacheEntry($orphanedId1);
$this->assertEquals($nonExistingParentId, $entry['parent']); // this row fails, $entry['parent'] seems to equal a similar but different value
$this->assertEquals($nonExistingParentId, $entry['parent']);
$this->assertEquals((string)$storageId, $entry['storage']);
$this->assertEquals('files/missingdir/orphaned1', $entry['path']);
$this->assertEquals(md5('files/missingdir/orphaned1'), $entry['path_hash']);
Expand Down Expand Up @@ -713,7 +713,7 @@ public function testRepairMissingRoot() {

// recreated root entry
$entry = $this->getFileCacheEntry($entry['parent']);
$this->assertEquals(-1, $entry['parent']); // this row fails, it appears to get attached to another entry, not the root (fileid ~ 4000)
$this->assertEquals(-1, $entry['parent']);
$this->assertEquals((string)$storageId, $entry['storage']);
$this->assertEquals('', $entry['path']);
$this->assertEquals(md5(''), $entry['path_hash']);
Expand Down
3 changes: 0 additions & 3 deletions tests/lib/TestCase.php
Original file line number Diff line number Diff line change
Expand Up @@ -222,9 +222,6 @@ public static function tearDownAfterClass() {
$dataDir = \OC::$server->getConfig()->getSystemValue('datadirectory', \OC::$SERVERROOT . '/data-autotest');
if (self::$wasDatabaseAllowed && \OC::$server->getDatabaseConnection()) {
$connection = \OC::$server->getDatabaseConnection();
if ($connection->inTransaction()) {
//throw new \Exception('Stray transaction in test class ' . get_called_class());
}
$queryBuilder = $connection->getQueryBuilder();

self::tearDownAfterClassCleanShares($queryBuilder);
Expand Down

0 comments on commit cea1009

Please sign in to comment.