summaryrefslogtreecommitdiff
path: root/jstests/core/system_profile.js
diff options
context:
space:
mode:
authorGeert Bosch <geert@mongodb.com>2017-06-28 14:17:30 -0400
committerGeert Bosch <geert@mongodb.com>2017-07-03 14:54:37 -0400
commitd362678ea9a9e4e948bfda0bc60e2fefdd1eb045 (patch)
tree2b6ca0fb605b361bbb60ccb7d26efc2fa914391c /jstests/core/system_profile.js
parente4ee6ba2f69d402bb682decd53f635146cc3fafb (diff)
downloadmongo-d362678ea9a9e4e948bfda0bc60e2fefdd1eb045.tar.gz
SERVER-29904 don't generate convertToCapped oplog entries
Diffstat (limited to 'jstests/core/system_profile.js')
-rw-r--r--jstests/core/system_profile.js7
1 files changed, 4 insertions, 3 deletions
diff --git a/jstests/core/system_profile.js b/jstests/core/system_profile.js
index 09baf334290..0e3cacb030c 100644
--- a/jstests/core/system_profile.js
+++ b/jstests/core/system_profile.js
@@ -8,12 +8,13 @@ assert.commandWorked(testDB.dropDatabase());
assert.commandWorked(testDB.createCollection("system.profile"));
testDB.system.profile.drop();
-// convertToCapped should succeed.
+// convertToCapped should fail.
assert.commandWorked(testDB.dropDatabase());
assert.commandWorked(testDB.createCollection("system.profile"));
assert.eq(false, testDB.system.profile.stats().capped);
-assert.commandWorked(testDB.system.profile.convertToCapped(1024 * 1024));
-assert.eq(true, testDB.system.profile.stats().capped);
+assert.commandFailedWithCode(testDB.system.profile.convertToCapped(1024 * 1024),
+ ErrorCodes.BadValue);
+assert.eq(false, testDB.system.profile.stats().capped);
// Basic write operations should fail.
assert.commandWorked(testDB.dropDatabase());