@@ -41,7 +41,7 @@ function getLastCommittedOpTime(conn) {
4141}
4242
4343const firstCommitPoint = getLastCommittedOpTime ( primary ) ;
44- jsTestLog ( `First commit point: ${ firstCommitPoint } ` ) ;
44+ jsTestLog ( `First commit point: ${ tojson ( firstCommitPoint ) } ` ) ;
4545
4646// Disconnect the non-voting secondary from the other nodes so that it won't update its commit point
4747// from the other nodes' heartbeats.
@@ -80,7 +80,7 @@ rst.awaitLastOpCommitted(undefined, [primary, secondary]);
8080
8181const secondCommitPointPrimary = getLastCommittedOpTime ( primary ) ;
8282const secondCommitPointSecondary = getLastCommittedOpTime ( secondary ) ;
83- jsTestLog ( `Second commit point: ${ secondCommitPointPrimary } ` ) ;
83+ jsTestLog ( `Second commit point: ${ tojson ( secondCommitPointPrimary ) } ` ) ;
8484
8585// Verify that the commit point has advanced on the primary and secondary.
8686assert . eq ( 1 , rs . compareOpTimes ( secondCommitPointPrimary , firstCommitPoint ) ) ;
@@ -91,7 +91,7 @@ let commitPointNonVotingSecondary = getLastCommittedOpTime(nonVotingSecondary);
9191assert . eq ( rs . compareOpTimes ( commitPointNonVotingSecondary , secondCommitPointPrimary ) ,
9292 - 1 ,
9393 `commit point on the non-voting secondary should not have been advanced: ${
94- commitPointNonVotingSecondary } `) ;
94+ tojson ( commitPointNonVotingSecondary ) } `) ;
9595
9696// Allow the node to proceed to the oplog applying phase of initial sync and ensure that the oplog
9797// fetcher thread is still running.
@@ -107,7 +107,7 @@ rst.awaitLastOpCommitted(undefined, [primary, secondary]);
107107
108108const thirdCommitPointPrimary = getLastCommittedOpTime ( primary ) ;
109109const thirdCommitPointSecondary = getLastCommittedOpTime ( secondary ) ;
110- jsTestLog ( `Third commit point: ${ thirdCommitPointPrimary } ` ) ;
110+ jsTestLog ( `Third commit point: ${ tojson ( thirdCommitPointPrimary ) } ` ) ;
111111
112112// Verify that the commit point has advanced on the primary and secondary.
113113assert . eq ( 1 , rs . compareOpTimes ( thirdCommitPointPrimary , secondCommitPointPrimary ) ) ;
@@ -118,7 +118,7 @@ commitPointNonVotingSecondary = getLastCommittedOpTime(nonVotingSecondary);
118118assert . eq ( rs . compareOpTimes ( commitPointNonVotingSecondary , thirdCommitPointPrimary ) ,
119119 - 1 ,
120120 `commit point on the non-voting secondary should not have been advanced: ${
121- commitPointNonVotingSecondary } `) ;
121+ tojson ( commitPointNonVotingSecondary ) } `) ;
122122
123123// Allow the initial sync node to complete oplog fetching but hang it before it completes initial
124124// sync.
@@ -133,7 +133,7 @@ assert.gte(
133133 rs . compareOpTimes ( commitPointInitialSyncNode , secondCommitPointPrimary ) ,
134134 0 ,
135135 `commit point on initial sync node should be at least as up-to-date as the second commit point: ${
136- commitPointInitialSyncNode } `) ;
136+ tojson ( commitPointInitialSyncNode ) } `) ;
137137
138138// Verify that the non-voting secondary has received the updated commit point via heartbeats from
139139// the initial sync node.
0 commit comments