Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit fd3d8ef

Browse files
committed
TOOLS-630 fix broken read prefs test
1 parent f112fd9 commit fd3d8ef

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

mongoexport/main/mongoexport.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ func main() {
6262
log.Logf(log.Always, "--slaveOk can't be specified when --readPreference is specified")
6363
os.Exit(util.ExitBadOptions)
6464
}
65-
log.Logf(log.Always, "--slaveOk is depriciated and being internally rewritten as --readPreference=nearest")
65+
log.Logf(log.Always, "--slaveOk is deprecated and being internally rewritten as --readPreference=nearest")
6666
inputOpts.ReadPreference = "nearest"
6767
}
6868

test/qa-tests/jstests/dump/read_preference_and_tags.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,14 +38,14 @@
3838

3939
rs.reconfig(conf);
4040

41-
runMongoProgram('mongodump', '--host', "replset/"+primary.host, '--readPreference=nearest', '--tags={use:"secondary1"}');
41+
runMongoProgram('mongodump', '--host', "replset/"+primary.host, '--readPreference={mode:"nearest", tags:{use:"secondary1"}}');
4242
jsTest.log("rawMongoProgramOutput "+ rawMongoProgramOutput());
4343

4444
replset1.nodes.forEach(function(node){
4545
var count = node.getDB('foo').system.profile.find().count();
4646
jsTest.log(node.host+" "+count);
4747
if (node.host == hostByTag["secondary1"]) {
48-
assert.ne(count,0,node.host);
48+
assert.neq(count,0,node.host);
4949
} else {
5050
assert.eq(count,0,node.host);
5151
}

0 commit comments

Comments
 (0)