diff options
author | Mathias Stearn <mathias@10gen.com> | 2013-07-11 12:01:48 -0400 |
---|---|---|
committer | Mathias Stearn <mathias@10gen.com> | 2013-07-11 12:23:17 -0400 |
commit | 0d5e34388ccfb8ebac716ff6eb4877cdb287f24c (patch) | |
tree | b5897eb57f5bd5bb32fbb468e6a92da260466fec /src/mongo/dbtests/directclienttests.cpp | |
parent | 331e3dc9c056a025c5bb5dca81ad4738d48dedc6 (diff) | |
download | mongo-0d5e34388ccfb8ebac716ff6eb4877cdb287f24c.tar.gz |
SERVER-10179 Fix test failure due to SERVER-10134
We now report getMore errors in the same format as query errors.
Diffstat (limited to 'src/mongo/dbtests/directclienttests.cpp')
-rw-r--r-- | src/mongo/dbtests/directclienttests.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/mongo/dbtests/directclienttests.cpp b/src/mongo/dbtests/directclienttests.cpp index ca212df2341..0bf1feb6067 100644 --- a/src/mongo/dbtests/directclienttests.cpp +++ b/src/mongo/dbtests/directclienttests.cpp @@ -102,15 +102,21 @@ namespace DirectClientTests { public: virtual void run(){ auto_ptr<DBClientCursor> cursor = client().query( "", Query(), 1 ); + ASSERT(cursor->more()); BSONObj result = cursor->next().getOwned(); ASSERT( result.hasField( "$err" )); + ASSERT_EQUALS(result["code"].Int(), 16332); } }; class BadNSGetMore : ClientBase { public: virtual void run(){ - ASSERT( !client().getMore( "", 1, 1 )->more() ); + auto_ptr<DBClientCursor> cursor = client().getMore("", 1, 1); + ASSERT(cursor->more()); + BSONObj result = cursor->next().getOwned(); + ASSERT(result.hasField("$err")); + ASSERT_EQUALS(result["code"].Int(), 16258); } }; |