Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GDrive unit tests fail on master #22481

Closed
PVince81 opened this issue Feb 17, 2016 · 11 comments
Closed

GDrive unit tests fail on master #22481

PVince81 opened this issue Feb 17, 2016 · 11 comments

Comments

@PVince81
Copy link
Contributor

PVince81 commented Feb 17, 2016

This is master 9c12485

Configuration: /srv/www/htdocs/owncloud/tests/phpunit-autotest.xml

............................................F..............F..F.. 65 / 80 ( 81%)
FFFFFEF........                                                   80 / 80 (100%)

Time: 17.94 minutes, Memory: 55.75Mb

There was 1 error:

1) Test\Files\Storage\Google::testCopyFromSameStorage with data set #5 ('/sòurcē.txt', '/target.txt')
Google_IO_Exception: Operation timed out after 100001 milliseconds with 0 bytes received

/srv/www/htdocs/owncloud/apps/files_external/3rdparty/google-api-php-client/src/Google/IO/Curl.php:81
/srv/www/htdocs/owncloud/apps/files_external/3rdparty/google-api-php-client/src/Google/IO/Abstract.php:125
/srv/www/htdocs/owncloud/apps/files_external/3rdparty/google-api-php-client/src/Google/Http/REST.php:42
/srv/www/htdocs/owncloud/apps/files_external/3rdparty/google-api-php-client/src/Google/Client.php:556
/srv/www/htdocs/owncloud/apps/files_external/3rdparty/google-api-php-client/src/Google/Service/Resource.php:195
/srv/www/htdocs/owncloud/apps/files_external/3rdparty/google-api-php-client/src/Google/Service/Drive.php:1783
/srv/www/htdocs/owncloud/apps/files_external/lib/google.php:121
/srv/www/htdocs/owncloud/apps/files_external/lib/google.php:137
/srv/www/htdocs/owncloud/apps/files_external/lib/google.php:352
/srv/www/htdocs/owncloud/apps/files_external/lib/google.php:463
/srv/www/htdocs/owncloud/lib/private/files/storage/common.php:188
/srv/www/htdocs/owncloud/tests/lib/files/storage/storage.php:183
/srv/www/htdocs/owncloud/tests/lib/files/storage/storage.php:565

--

There were 9 failures:

1) Test\Files\Storage\Google::testStat
Failed asserting that false is true.

/srv/www/htdocs/owncloud/tests/lib/files/storage/storage.php:288

2) Test\Files\Storage\Google::testRenameOverWriteDirectory
target/test1.txt has not been overwritten
Failed asserting that false matches expected 'foo'.

/srv/www/htdocs/owncloud/tests/lib/files/storage/storage.php:489

3) Test\Files\Storage\Google::testCopyOverWriteDirectory
Failed asserting that true is false.

/srv/www/htdocs/owncloud/tests/lib/files/storage/storage.php:540

4) Test\Files\Storage\Google::testCopyFromSameStorage with data set #0 ('/source.txt', '/target.txt')
Expected /target.txt to be a copy of /srv/www/htdocs/owncloud/tests/data/lorem.txt
Failed asserting that false matches expected 'Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.
Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.'.

/srv/www/htdocs/owncloud/tests/lib/files/storage/storage.php:196
/srv/www/htdocs/owncloud/tests/lib/files/storage/storage.php:570

5) Test\Files\Storage\Google::testCopyFromSameStorage with data set #1 ('/source.txt', '/target with space.txt')
Expected /target with space.txt to be a copy of /srv/www/htdocs/owncloud/tests/data/lorem.txt
Failed asserting that false matches expected 'Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.
Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.'.

/srv/www/htdocs/owncloud/tests/lib/files/storage/storage.php:196
/srv/www/htdocs/owncloud/tests/lib/files/storage/storage.php:570

6) Test\Files\Storage\Google::testCopyFromSameStorage with data set #2 ('/source with space.txt', '/target.txt')
Expected /target.txt to be a copy of /srv/www/htdocs/owncloud/tests/data/lorem.txt
Failed asserting that false matches expected 'Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.
Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.'.

/srv/www/htdocs/owncloud/tests/lib/files/storage/storage.php:196
/srv/www/htdocs/owncloud/tests/lib/files/storage/storage.php:570

7) Test\Files\Storage\Google::testCopyFromSameStorage with data set #3 ('/source with space.txt', '/target with space.txt')
Expected /target with space.txt to be a copy of /srv/www/htdocs/owncloud/tests/data/lorem.txt
Failed asserting that false matches expected 'Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.
Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.'.

/srv/www/htdocs/owncloud/tests/lib/files/storage/storage.php:196
/srv/www/htdocs/owncloud/tests/lib/files/storage/storage.php:570

8) Test\Files\Storage\Google::testCopyFromSameStorage with data set #4 ('/source.txt', '/tärgét.txt')
Expected /tärgét.txt to be a copy of /srv/www/htdocs/owncloud/tests/data/lorem.txt
Failed asserting that false matches expected 'Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.
Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.'.

/srv/www/htdocs/owncloud/tests/lib/files/storage/storage.php:196
/srv/www/htdocs/owncloud/tests/lib/files/storage/storage.php:570

9) Test\Files\Storage\Google::testCopyFromSameStorage with data set #6 ('/sòurcē.txt', '/tärgét.txt')
Expected /tärgét.txt to be a copy of /srv/www/htdocs/owncloud/tests/data/lorem.txt
Failed asserting that false matches expected 'Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.
Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.'.

/srv/www/htdocs/owncloud/tests/lib/files/storage/storage.php:196
/srv/www/htdocs/owncloud/tests/lib/files/storage/storage.php:570

I'm pretty sure this was always broken and the GDrive storage didn't work properly with rename + overwrite and copy operations.

This ticket is to make those work too. (note: the sync client doesn't use these operations)

@PVince81
Copy link
Contributor Author

PVince81 commented Jun 7, 2016

I suspect the copy failures are due to the fact that we don't fclose here: https://github.com/owncloud/core/blob/v9.0.2/lib/private/files/storage/common.php#L220, so the fclose wrapper might not be called properly and the subsequent retrieval of the file contents in the test fails.

@PVince81
Copy link
Contributor Author

PVince81 commented Jun 7, 2016

Apparently no.

It seems the drivefiles stat cache isn't adjusted properly.

@PVince81
Copy link
Contributor Author

PVince81 commented Jun 7, 2016

PR here #25010

@ChristophWurst
Copy link
Contributor

PR here #25010

@PVince81 was this fixed by #25010?

@PVince81
Copy link
Contributor Author

Not completely, only "testRenameOverWriteDirectory" was fixed.

The other ones are more tricky, especially that they pass when run individually...

@PVince81 PVince81 modified the milestones: 9.1-current, 9.1.1-next-maintenance Jun 30, 2016
@PVince81
Copy link
Contributor Author

PVince81 commented Jul 1, 2016

Remaining failures:

Runtime:       PHP 5.6.22 with Xdebug 2.3.3
Configuration: /srv/www/htdocs/owncloud/tests/phpunit-autotest.xml

.............................................F.................F. 65 / 81 ( 80%)
................                                                  81 / 81 (100%)

Time: 11.74 minutes, Memory: 63.00Mb

There were 2 failures:

1) OCA\Files_External\Tests\Storage\GoogleTest::testStat
Failed asserting that false is true.

/srv/www/htdocs/owncloud/tests/lib/Files/Storage/Storage.php:288

2) OCA\Files_External\Tests\Storage\GoogleTest::testCopyOverWriteDirectory
Failed asserting that true is false.

/srv/www/htdocs/owncloud/tests/lib/Files/Storage/Storage.php:540

FAILURES!
Tests: 81, Assertions: 419, Failures: 2.

@PVince81
Copy link
Contributor Author

PVince81 commented Jul 1, 2016

If commenting out all tests except "testStat" and "testCopyOverWriteDirectory", the former will pass (side effect ?) but the latter will still fail.

@PVince81
Copy link
Contributor Author

PVince81 commented Jul 1, 2016

Boah... and now testStat fails randomly.
And testCopyOverWriteDirectory passes if I slowly step into the functions, maybe there is something on GDrive's side that needs a bit of time to update itself. (copy?)

@PVince81 PVince81 modified the milestones: 9.2, 9.1.1 Sep 21, 2016
@PVince81 PVince81 modified the milestones: 10.0.1, 10.0 Apr 7, 2017
@PVince81 PVince81 modified the milestones: backlog, 10.0.1 May 17, 2017
@ownclouders
Copy link
Contributor

Hey, this issue has been closed because the label status/STALE is set and there were no updates for 7 days. Feel free to reopen this issue if you deem it appropriate.

(This is an automated comment from GitMate.io.)

@PVince81
Copy link
Contributor Author

moved to owncloud/files_external_gdrive#16

@lock
Copy link

lock bot commented Jul 31, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked as resolved and limited conversation to collaborators Jul 31, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants