@@ -41,7 +41,7 @@ function getLastCommittedOpTime(conn) {
41
41
}
42
42
43
43
const firstCommitPoint = getLastCommittedOpTime ( primary ) ;
44
- jsTestLog ( `First commit point: ${ firstCommitPoint } ` ) ;
44
+ jsTestLog ( `First commit point: ${ tojson ( firstCommitPoint ) } ` ) ;
45
45
46
46
// Disconnect the non-voting secondary from the other nodes so that it won't update its commit point
47
47
// from the other nodes' heartbeats.
@@ -80,7 +80,7 @@ rst.awaitLastOpCommitted(undefined, [primary, secondary]);
80
80
81
81
const secondCommitPointPrimary = getLastCommittedOpTime ( primary ) ;
82
82
const secondCommitPointSecondary = getLastCommittedOpTime ( secondary ) ;
83
- jsTestLog ( `Second commit point: ${ secondCommitPointPrimary } ` ) ;
83
+ jsTestLog ( `Second commit point: ${ tojson ( secondCommitPointPrimary ) } ` ) ;
84
84
85
85
// Verify that the commit point has advanced on the primary and secondary.
86
86
assert . eq ( 1 , rs . compareOpTimes ( secondCommitPointPrimary , firstCommitPoint ) ) ;
@@ -91,7 +91,7 @@ let commitPointNonVotingSecondary = getLastCommittedOpTime(nonVotingSecondary);
91
91
assert . eq ( rs . compareOpTimes ( commitPointNonVotingSecondary , secondCommitPointPrimary ) ,
92
92
- 1 ,
93
93
`commit point on the non-voting secondary should not have been advanced: ${
94
- commitPointNonVotingSecondary } `) ;
94
+ tojson ( commitPointNonVotingSecondary ) } `) ;
95
95
96
96
// Allow the node to proceed to the oplog applying phase of initial sync and ensure that the oplog
97
97
// fetcher thread is still running.
@@ -107,7 +107,7 @@ rst.awaitLastOpCommitted(undefined, [primary, secondary]);
107
107
108
108
const thirdCommitPointPrimary = getLastCommittedOpTime ( primary ) ;
109
109
const thirdCommitPointSecondary = getLastCommittedOpTime ( secondary ) ;
110
- jsTestLog ( `Third commit point: ${ thirdCommitPointPrimary } ` ) ;
110
+ jsTestLog ( `Third commit point: ${ tojson ( thirdCommitPointPrimary ) } ` ) ;
111
111
112
112
// Verify that the commit point has advanced on the primary and secondary.
113
113
assert . eq ( 1 , rs . compareOpTimes ( thirdCommitPointPrimary , secondCommitPointPrimary ) ) ;
@@ -118,7 +118,7 @@ commitPointNonVotingSecondary = getLastCommittedOpTime(nonVotingSecondary);
118
118
assert . eq ( rs . compareOpTimes ( commitPointNonVotingSecondary , thirdCommitPointPrimary ) ,
119
119
- 1 ,
120
120
`commit point on the non-voting secondary should not have been advanced: ${
121
- commitPointNonVotingSecondary } `) ;
121
+ tojson ( commitPointNonVotingSecondary ) } `) ;
122
122
123
123
// Allow the initial sync node to complete oplog fetching but hang it before it completes initial
124
124
// sync.
@@ -133,7 +133,7 @@ assert.gte(
133
133
rs . compareOpTimes ( commitPointInitialSyncNode , secondCommitPointPrimary ) ,
134
134
0 ,
135
135
`commit point on initial sync node should be at least as up-to-date as the second commit point: ${
136
- commitPointInitialSyncNode } `) ;
136
+ tojson ( commitPointInitialSyncNode ) } `) ;
137
137
138
138
// Verify that the non-voting secondary has received the updated commit point via heartbeats from
139
139
// the initial sync node.
0 commit comments