summaryrefslogtreecommitdiff
path: root/jstests/replsets/profile.js
diff options
context:
space:
mode:
authorLucas de Castro Borges <lucas@gnuabordo.com.br>2025-02-11 15:07:35 -0300
committerLucas de Castro Borges <lucas@gnuabordo.com.br>2025-02-11 15:07:35 -0300
commit4cb8841196d0625dfa3825aa326f071cd27c7b8b (patch)
tree1682a647d4463397c119183369ae6f750d5fdcff /jstests/replsets/profile.js
parentaa03c6362cbaa767638e6eed9b031d86dd2643d1 (diff)
parent8f0827553e09872941945a093b647a4211a9db7f (diff)
Update upstream source from tag 'upstream/6.0.0'master
Update to upstream version '6.0.0' with Debian dir 5604a80ec1c96ca76f25f40d78e6ef855abec322
Diffstat (limited to 'jstests/replsets/profile.js')
-rw-r--r--jstests/replsets/profile.js28
1 files changed, 7 insertions, 21 deletions
diff --git a/jstests/replsets/profile.js b/jstests/replsets/profile.js
index d7c6cfde9e3..caa5d7f8871 100644
--- a/jstests/replsets/profile.js
+++ b/jstests/replsets/profile.js
@@ -1,11 +1,7 @@
// Confirm that implicitly created profile collections are successful and do not trigger assertions.
// In order to implicitly create a profile collection with a read, we must set up the server with
// some data to read without the profiler being active.
-// @tags: [
-// # 'assert' log component is not available in 5.0.
-// requires_fcv_60,
-// requires_persistence,
-// ]
+// @tags: [requires_persistence]
(function() {
"use strict";
let rst = new ReplSetTest({nodes: {n0: {profile: "0"}}});
@@ -24,22 +20,12 @@ primary = rst.getPrimary();
primaryDB = primary.getDB('test');
let oldAssertCounts = primaryDB.serverStatus().asserts;
-jsTestLog('Before running aggregation: Assert counts reported by db.serverStatus(): ' +
- tojson(oldAssertCounts));
-primaryDB.setLogLevel(1, 'assert');
-try {
- assert.eq(0, primaryDB.system.profile.count());
- assert.eq([{_id: 1}], primaryDB.foo.aggregate([]).toArray());
-
- let newAssertCounts = primaryDB.serverStatus().asserts;
- jsTestLog('After running aggregation: Assert counts reported by db.serverStatus(): ' +
- tojson(newAssertCounts));
- assert.eq(oldAssertCounts, newAssertCounts);
- // Should have 2 entries, one for the count command and one for the aggregate command.
- assert.eq(2, primaryDB.system.profile.count());
-} finally {
- primaryDB.setLogLevel(0, 'assert');
-}
+assert.eq(0, primaryDB.system.profile.count());
+assert.eq([{_id: 1}], primaryDB.foo.aggregate([]).toArray());
+let newAssertCounts = primaryDB.serverStatus().asserts;
+assert.eq(oldAssertCounts, newAssertCounts);
+// Should have 2 entries, one for the count command and one for the aggregate command.
+assert.eq(2, primaryDB.system.profile.count());
rst.stopSet();
})();