2017-03-23 14:07:50 -04:00
|
|
|
// Cannot implicitly shard accessed collections because of collection existing when none
|
|
|
|
|
// expected.
|
2019-03-11 18:17:29 -04:00
|
|
|
// @tags: [
|
|
|
|
|
// assumes_no_implicit_collection_creation_after_drop,
|
|
|
|
|
// requires_collstats,
|
|
|
|
|
// uses_multiple_connections,
|
|
|
|
|
// ]
|
2017-03-23 14:07:50 -04:00
|
|
|
|
2014-01-14 14:09:42 -05:00
|
|
|
// Create a new connection object so it won't affect the global connection when we modify
|
|
|
|
|
// it's settings.
|
|
|
|
|
var conn = new Mongo(db.getMongo().host);
|
|
|
|
|
conn.forceWriteMode(db.getMongo().writeMode());
|
|
|
|
|
|
|
|
|
|
t = conn.getDB(db.getName()).insert2;
|
|
|
|
|
t.drop();
|
|
|
|
|
|
2016-03-09 12:17:50 -05:00
|
|
|
assert.isnull(t.findOne(), "A");
|
|
|
|
|
assert.writeError(t.insert({z: 1, $inc: {x: 1}}, 0, true));
|
|
|
|
|
assert.isnull(t.findOne(), "B");
|
2014-03-04 14:24:16 -05:00
|
|
|
// Collection should not exist
|
2018-06-25 09:07:29 -04:00
|
|
|
assert.isnull(t.exists());
|