summaryrefslogtreecommitdiff
path: root/jstests/noPassthroughWithMongod/query_oplogreplay.js
diff options
context:
space:
mode:
authorTess Avitabile <tess.avitabile@mongodb.com>2016-02-10 12:25:22 -0500
committerTess Avitabile <tess.avitabile@mongodb.com>2016-02-17 17:24:02 -0500
commit3c88a1d6d1c90dc36bc47e76a502bb0cb775fb5d (patch)
tree9d2dbb099ef09b764a832107ff8aaedbf6b5b6a5 /jstests/noPassthroughWithMongod/query_oplogreplay.js
parent054d07ae6bcbc4eb408c1d7ba070b4dccdaa9cd3 (diff)
downloadmongo-3c88a1d6d1c90dc36bc47e76a502bb0cb775fb5d.tar.gz
SERVER-22344 Error if OplogReplay cursor requested on non-capped collection
Diffstat (limited to 'jstests/noPassthroughWithMongod/query_oplogreplay.js')
-rw-r--r--jstests/noPassthroughWithMongod/query_oplogreplay.js8
1 files changed, 8 insertions, 0 deletions
diff --git a/jstests/noPassthroughWithMongod/query_oplogreplay.js b/jstests/noPassthroughWithMongod/query_oplogreplay.js
index 67982025ebc..fc2760577bc 100644
--- a/jstests/noPassthroughWithMongod/query_oplogreplay.js
+++ b/jstests/noPassthroughWithMongod/query_oplogreplay.js
@@ -55,3 +55,11 @@ test(db.jstests_query_oplogreplay);
// test on real oplog
test(db.getSiblingDB('local').oplog.jstests_query_oplogreplay);
+
+// test on non-capped collection
+var coll = db.jstests_query_oplogreplay;
+coll.drop();
+assert.commandWorked(coll.getDB().createCollection(coll.getName()));
+var res = assert.throws(function() {
+ coll.find({ts: {$gt: "abcd"}}).addOption(DBQuery.Option.oplogReplay).next();
+ });