diff options
author | Ren <renctan@gmail.com> | 2012-02-13 14:01:39 -0500 |
---|---|---|
committer | Ren <renctan@gmail.com> | 2012-02-17 14:26:08 -0500 |
commit | 8b833b9a759b0b3c1f058908c38066e1d8f961fb (patch) | |
tree | 06dba364d43a05e872ccb0f8d275cec212df61ce /jstests/sharding/shard_with_special_db_names.js | |
parent | 1a016d3b3a5f7a6253a4a51d6a7075aa498bf5f6 (diff) | |
download | mongo-8b833b9a759b0b3c1f058908c38066e1d8f961fb.tar.gz |
fixed wrong test for SERVER-4954
Diffstat (limited to 'jstests/sharding/shard_with_special_db_names.js')
-rw-r--r-- | jstests/sharding/shard_with_special_db_names.js | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/jstests/sharding/shard_with_special_db_names.js b/jstests/sharding/shard_with_special_db_names.js index 14ba12e6ea5..7f83b21ed22 100644 --- a/jstests/sharding/shard_with_special_db_names.js +++ b/jstests/sharding/shard_with_special_db_names.js @@ -19,8 +19,15 @@ assert.eq( exists, 1 ); // Test that drop database properly cleans up config s.getDB(specialDB).dropDatabase(); -exists = s.getDB(specialDB).collections.find( { _id: specialNS } ).count(); -assert.eq( exists, 0 ); +var cursor = s.getDB("config").collections.find( { _id: specialNS } ); + +if (cursor.hasNext()) { + assert.eq( cursor.count(), 1 ); + assert( cursor.next()["dropped"] ); +} +else { + // It's alright if not found since it should be deleted +} })(); |