summaryrefslogtreecommitdiff
path: root/jstests
diff options
context:
space:
mode:
authorGabriel Marks <gabriel.marks@mongodb.com>2022-07-06 18:50:30 +0000
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2022-07-07 21:01:15 +0000
commitaef40887716046f0ac3503d3142630a23ae8b1e5 (patch)
tree32f8ec81899c63c47763d022461dfec4567dbb48 /jstests
parent4f48766343c4d029d2b5cf373c3a6c46ddf6b576 (diff)
downloadmongo-aef40887716046f0ac3503d3142630a23ae8b1e5.tar.gz
SERVER-67532 Fail oplog server status section less
Diffstat (limited to 'jstests')
-rw-r--r--jstests/replsets/optime.js7
1 files changed, 5 insertions, 2 deletions
diff --git a/jstests/replsets/optime.js b/jstests/replsets/optime.js
index 7311c5e9b9d..0c633d490c4 100644
--- a/jstests/replsets/optime.js
+++ b/jstests/replsets/optime.js
@@ -62,8 +62,11 @@ var replTest = new ReplSetTest(
const nodes = replTest.startSet();
-// Tests that serverStatus oplog returns an error if the oplog collection doesn't exist.
-assert.commandFailedWithCode(nodes[0].getDB('admin').serverStatus({oplog: true}), 17347);
+// Tests that serverStatus oplog returns null timestamps if the oplog collection doesn't exist.
+const zeroTs = new Timestamp(0, 0);
+const oplogStatus = nodes[0].getDB('admin').serverStatus({oplog: true}).oplog;
+assert.eq(oplogStatus.earliestOptime, zeroTs);
+assert.eq(oplogStatus.latestOptime, zeroTs);
replTest.initiate();
var primary = replTest.getPrimary();