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

Test suit breaks when using MongoDB > 3.4 #241

Closed
1ma opened this issue Jun 27, 2018 · 0 comments
Closed

Test suit breaks when using MongoDB > 3.4 #241

1ma opened this issue Jun 27, 2018 · 0 comments
Labels

Comments

@1ma
Copy link
Contributor

1ma commented Jun 27, 2018

From the master branch, the issue can be quickly reproduced with the help of docker:

~/workspace/xhgui$ docker run -d --name mongu -p 127.0.0.1:27017:27017 mongo:3.4
c5b460442a380c50c19562dad3c7c7462b6622fc267bb82a24a152dc8b848c2b

~/workspace/xhgui$ php vendor/bin/phpunit 
PHPUnit 5.7.27 by Sebastian Bergmann and contributors.

.........IIIIII.................................................. 65 / 72 ( 90%)
.......                                                           72 / 72 (100%)

Time: 379 ms, Memory: 8.00MB

OK, but incomplete, skipped, or risky tests!
Tests: 72, Assertions: 199, Incomplete: 6.

~/workspace/xhgui$ docker rm -f -v mongu
mongu

~/workspace/xhgui$ docker run -d --name mongu -p 127.0.0.1:27017:27017 mongo:3.5
14931915d3e429eef17783c28d57505bedcd7196533754a6bb3ac72e605f5327

~/workspace/xhgui$ php vendor/bin/phpunit 
PHPUnit 5.7.27 by Sebastian Bergmann and contributors.

.........IIIIII.....................................EE........... 65 / 72 ( 90%)
.......                                                           72 / 72 (100%)

Time: 382 ms, Memory: 8.00MB

There were 2 errors:

1) ProfilesTest::testGetAvgsForUrl
MongoResultException: The 'cursor' option is required, except for aggregate with the explain argument

/home/marcel/workspace/xhgui/vendor/alcaeus/mongo-php-adapter/lib/Alcaeus/MongoDbAdapter/ExceptionConverter.php:83
/home/marcel/workspace/xhgui/vendor/alcaeus/mongo-php-adapter/lib/Mongo/MongoCollection.php:173
/home/marcel/workspace/xhgui/src/Xhgui/Profiles.php:203
/home/marcel/workspace/xhgui/tests/ProfilesTest.php:107

Caused by
MongoDB\Driver\Exception\RuntimeException: The 'cursor' option is required, except for aggregate with the explain argument

/home/marcel/workspace/xhgui/vendor/mongodb/mongodb/src/Operation/Aggregate.php:248
/home/marcel/workspace/xhgui/vendor/mongodb/mongodb/src/Collection.php:218
/home/marcel/workspace/xhgui/vendor/alcaeus/mongo-php-adapter/lib/Mongo/MongoCollection.php:165
/home/marcel/workspace/xhgui/src/Xhgui/Profiles.php:203
/home/marcel/workspace/xhgui/tests/ProfilesTest.php:107

2) ProfilesTest::testGetAvgsForUrlWithSearch
MongoResultException: The 'cursor' option is required, except for aggregate with the explain argument

/home/marcel/workspace/xhgui/vendor/alcaeus/mongo-php-adapter/lib/Alcaeus/MongoDbAdapter/ExceptionConverter.php:83
/home/marcel/workspace/xhgui/vendor/alcaeus/mongo-php-adapter/lib/Mongo/MongoCollection.php:173
/home/marcel/workspace/xhgui/src/Xhgui/Profiles.php:203
/home/marcel/workspace/xhgui/tests/ProfilesTest.php:122

Caused by
MongoDB\Driver\Exception\RuntimeException: The 'cursor' option is required, except for aggregate with the explain argument

/home/marcel/workspace/xhgui/vendor/mongodb/mongodb/src/Operation/Aggregate.php:248
/home/marcel/workspace/xhgui/vendor/mongodb/mongodb/src/Collection.php:218
/home/marcel/workspace/xhgui/vendor/alcaeus/mongo-php-adapter/lib/Mongo/MongoCollection.php:165
/home/marcel/workspace/xhgui/src/Xhgui/Profiles.php:203
/home/marcel/workspace/xhgui/tests/ProfilesTest.php:122

ERRORS!
Tests: 72, Assertions: 186, Errors: 2, Incomplete: 6.

Might be related to #221, #232

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants