Files
mongo/jstests/core/capped_empty.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
379 B
JavaScript

// @tags: [requires_non_retryable_commands]
t = db.capped_empty;
t.drop();
db.createCollection(t.getName(), {capped: true, size: 100});
t.insert({x: 1});
t.insert({x: 2});
t.insert({x: 3});
t.ensureIndex({x: 1});
assert.eq(3, t.count());
t.runCommand("emptycapped");
assert.eq(0, t.count());
t.insert({x: 1});
t.insert({x: 2});
t.insert({x: 3});
assert.eq(3, t.count());