Files
mongo/jstests/core/indexe.js
Jack Mulrow 00d92ece19 SERVER-31194 Add jscore tags for retryable_writes_jscore_stepdown_passthrough.yml suite
The actual suite will come in a follow-up commit.
2017-12-07 14:36:15 -05:00

24 lines
494 B
JavaScript

// @tags: [requires_getmore]
t = db.indexe;
t.drop();
var num = 1000;
for (i = 0; i < num; i++) {
t.insert({a: "b"});
}
assert.eq(num, t.find().count(), "A1");
assert.eq(num, t.find({a: "b"}).count(), "B1");
assert.eq(num, t.find({a: "b"}).itcount(), "C1");
t.ensureIndex({a: 1});
assert.eq(num, t.find().count(), "A2");
assert.eq(num, t.find().sort({a: 1}).count(), "A2a");
assert.eq(num, t.find({a: "b"}).count(), "B2");
assert.eq(num, t.find({a: "b"}).itcount(), "C3");
t.drop();