Files
mongo/jstests/core/count7.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

28 lines
511 B
JavaScript

// @tags: [requires_non_retryable_writes]
// Check normal count matching and deduping.
t = db.jstests_count7;
t.drop();
t.ensureIndex({a: 1});
t.save({a: 'algebra'});
t.save({a: 'apple'});
t.save({a: 'azores'});
t.save({a: 'bumper'});
t.save({a: 'supper'});
t.save({a: 'termite'});
t.save({a: 'zeppelin'});
t.save({a: 'ziggurat'});
t.save({a: 'zope'});
assert.eq(5, t.count({a: /p/}));
t.remove({});
t.save({a: [1, 2, 3]});
t.save({a: [1, 2, 3]});
t.save({a: [1]});
assert.eq(2, t.count({a: {$gt: 1}}));