From cbcdf69dc218a9767b2682c0a1825f9f36e78266 Mon Sep 17 00:00:00 2001 From: Robin Appelman Date: Wed, 9 Nov 2016 16:14:54 +0100 Subject: only query substorages to calculate the final mtime/size/etag lazily Signed-off-by: Robin Appelman --- apps/files_sharing/tests/SizePropagationTest.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'apps/files_sharing/tests') diff --git a/apps/files_sharing/tests/SizePropagationTest.php b/apps/files_sharing/tests/SizePropagationTest.php index 04db505e8a5..9d80633b46a 100644 --- a/apps/files_sharing/tests/SizePropagationTest.php +++ b/apps/files_sharing/tests/SizePropagationTest.php @@ -102,6 +102,7 @@ class SizePropagationTest extends TestCase { $this->assertTrue($recipientView->file_exists('/sharedfolder/subfolder/foo.txt')); $recipientRootInfo = $recipientView->getFileInfo('', false); $recipientRootInfoWithMounts = $recipientView->getFileInfo('', true); + $oldRecipientSize = $recipientRootInfoWithMounts->getSize(); // when file changed as recipient $recipientView->file_put_contents('/sharedfolder/subfolder/foo.txt', 'foobar'); @@ -112,7 +113,7 @@ class SizePropagationTest extends TestCase { // but the size including mountpoints increases $newRecipientRootInfo = $recipientView->getFileInfo('', true); - $this->assertEquals($recipientRootInfoWithMounts->getSize() +3, $newRecipientRootInfo->getSize()); + $this->assertEquals($oldRecipientSize +3, $newRecipientRootInfo->getSize()); // size of owner's root increases $this->loginAsUser(self::TEST_FILES_SHARING_API_USER2); -- cgit v1.2.3