diff options
author | Irina Yatsenko <irina.yatsenko@mongodb.com> | 2021-07-07 15:44:54 +0000 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2021-07-16 05:38:55 +0000 |
commit | beeab6beaf18232e52bb3094f5f31fe83fbae2a4 (patch) | |
tree | dce5b9fefa813283212757dcf16f59e4b8bffe9e /jstests | |
parent | 23ecc48f89f4ec03d7b42e637c5969802efdb261 (diff) | |
download | mongo-beeab6beaf18232e52bb3094f5f31fe83fbae2a4.tar.gz |
SERVER-57391 Return error response to OP_QUERY and OP_GET_MORE messages
Diffstat (limited to 'jstests')
-rw-r--r-- | jstests/noPassthroughWithMongod/getmore_error.js | 36 |
1 files changed, 0 insertions, 36 deletions
diff --git a/jstests/noPassthroughWithMongod/getmore_error.js b/jstests/noPassthroughWithMongod/getmore_error.js deleted file mode 100644 index 4fed6c38d3d..00000000000 --- a/jstests/noPassthroughWithMongod/getmore_error.js +++ /dev/null @@ -1,36 +0,0 @@ -// ensure errors in getmore are properly reported to users - -var t = db.getmore_error; - -for (var i = 0; i < 10; i++) { - t.insert({_id: i}); -} - -var cursor = t.find().batchSize(2); // 1 is a special case - -// first batch (only one from OP_QUERY) -assert.eq(cursor.next(), {_id: 0}); -assert.eq(cursor.next(), {_id: 1}); -assert.eq(cursor.objsLeftInBatch(), 0); - -// second batch (first from OP_GETMORE) -assert.eq(cursor.next(), {_id: 2}); -assert.eq(cursor.next(), {_id: 3}); -assert.eq(cursor.objsLeftInBatch(), 0); - -/* -// QUERY_MIGRATION disabling this because it's hard to have a failpoint in 2 parallel -// systems -// make the next OP_GETMORE fail -assert.commandWorked( - db.adminCommand({configureFailPoint: 'getMoreError', mode: {times: 1}}) -); - -// attempt to get next batch should fail with a failpoint error -var error = assert.throws(function(){cursor.next();}); -if (!error.search(/failpoint/)) - assert(false, "got a non-failpoint error: " + error); -*/ - -// make sure we won't break other tests by breaking getmore for them -assert.eq(t.find().batchSize(2).itcount(), 10); |