-
Notifications
You must be signed in to change notification settings - Fork 266
Update to latest ext-mongodb and MongoDB server versions #669
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A couple of questions and suggested change for MONGODB_URI
prep, but LGTM.
@@ -18,6 +18,10 @@ | |||
*/ | |||
class ChangeStreamsSpecTest extends FunctionalTestCase | |||
{ | |||
private static $incompleteTests = [ | |||
'change-streams-errors: Change Stream should error when _id is projected out' => 'PHPC-1419', | |||
]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Was this test previously passing?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The test fails on sharded clusters, but for different reasons.
On a sharded cluster backed by standalone servers, $changeStream
obviously isn't supported. This causes an exception when trying to run the watch operation from the spec test, but that exception does not contain the NonResumableChangeStreamError
(because it's not a change stream error) label, causing the test to fail.
This is caused because the spec requires this test to run on both replicaset and sharded topologies. Unfortunately, the spec does not differentiate between the two types of sharded clusters (backed entirely by replicasets or not), so this is something we may want to address in the specification in the future. However, since the spec test also require testing change streams on a standalone server to ensure an exception is thrown, we can't just skip these tests on unsupported platforms. I may have to hardcode an exception for this one particular test.
On a sharded cluster backed by replica sets, we're seeing the behaviour described in #659 (comment). In a nutshell, the first getMore
call does not return any results as mongos hasn't received returnable results from all shards yet. A subsequent getMore
would return a document, causing the getMore
call to fail with the expected error. Even then, the test still fails because of PHPC-1419: the NonResumableChangeStreamError
is not present in the exception.
With that in mind, I'd skip the test for now and properly fix it in #659 where we take care of other change stream tests as well.
FWIW, debugging this issue made me realise that PHPC-1419 only appears on sharded clusters. I'll investigate that further separately to figure out the cause of the bug.
a84ab8a
to
49d32aa
Compare
This pulls in alpha3 of the driver for travis-ci builds and updates the build pipeline to test against MongoDB 4.2.0 by default. MongoDB 4.0.12 is still tested as part of the "older server versions" sections in travis-ci.
This PR also fixes some leftover warnings from the PHPUnit upgrade that was done in #665.