Skip to content

Commit

Permalink
test(drop): fixing drop assertions for sharded tests
Browse files Browse the repository at this point in the history
As tracked in SERVER-36317, dropping a non-existent collection
behaves differently for sharded topologies. Disabling assertions
that depend on this until the issue is resolved.
  • Loading branch information
daprahamian authored and mbroadst committed Jan 14, 2019
1 parent 5f13558 commit 985f0e9
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 7 deletions.
10 changes: 6 additions & 4 deletions test/functional/insert_tests.js
Expand Up @@ -2606,8 +2606,9 @@ describe('Insert', function() {
var db = client.db(configuration.db);
// Get collection
var col = db.collection('insertManyMultipleWriteErrors2');
col.drop(function(err, r) {
expect(r).to.not.exist;
col.drop(function(/*err, r*/) {
// TODO: reenable once SERVER-36317 is resolved
// expect(r).to.not.exist;

// Create unique index
col.createIndex({ a: 1 }, { unique: true }, function(err, r) {
Expand Down Expand Up @@ -2647,8 +2648,9 @@ describe('Insert', function() {
var db = client.db(configuration.db);
// Get collection
var col = db.collection('insertManyMultipleWriteErrors3');
col.drop(function(err, r) {
expect(r).to.not.exist;
col.drop(function(/*err, r*/) {
// TODO: reenable once SERVER-36317 is resolved
// expect(r).to.not.exist;

// Create unique index
col.createIndex({ a: 1 }, { unique: true }, function(err, r) {
Expand Down
7 changes: 4 additions & 3 deletions test/functional/operation_example_tests.js
Expand Up @@ -1071,9 +1071,10 @@ describe('Operation Examples', function() {
var collection = db.collection('test_other_drop');

// Drop the collection
collection.drop(function(err, reply) {
expect(err).to.exist;
expect(reply).to.not.exist;
collection.drop(function(/*err, reply*/) {
// TODO: reenable once SERVER-36317 is resolved
// expect(err).to.exist;
// expect(reply).to.not.exist;

// Ensure we don't have the collection in the set of names
db.listCollections().toArray(function(err, replies) {
Expand Down

0 comments on commit 985f0e9

Please sign in to comment.