From beeab6beaf18232e52bb3094f5f31fe83fbae2a4 Mon Sep 17 00:00:00 2001 From: Irina Yatsenko Date: Wed, 7 Jul 2021 15:44:54 +0000 Subject: SERVER-57391 Return error response to OP_QUERY and OP_GET_MORE messages --- jstests/noPassthroughWithMongod/getmore_error.js | 36 ------------------------ 1 file changed, 36 deletions(-) delete mode 100644 jstests/noPassthroughWithMongod/getmore_error.js (limited to 'jstests') 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); -- cgit v1.2.1