Skip to content

Commit 161aba9

Browse files
committed
JAVA-497: Rolling back this change until what we want to do is fully spec'd
1 parent 917d760 commit 161aba9

File tree

2 files changed

+20
-20
lines changed

2 files changed

+20
-20
lines changed

src/main/com/mongodb/DB.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ public CommandResult command( DBObject cmd, DBEncoder encoder ) throws MongoExce
150150

151151
public CommandResult command( DBObject cmd , int options, DBEncoder encoder )
152152
throws MongoException {
153-
return command(cmd, options, getReadPreference(), encoder);
153+
return command(cmd, options, null, encoder);
154154
}
155155

156156
public CommandResult command( DBObject cmd , int options, ReadPreference readPrefs )

src/test/com/mongodb/DBTests.java

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -110,25 +110,25 @@ public void testRenameAndDrop() throws MongoException {
110110

111111
}
112112

113-
@Test
114-
public void testCommandToSecondary() throws MongoException, UnknownHostException {
115-
Mongo mongo = new Mongo(Arrays.asList(new ServerAddress("127.0.0.1"), new ServerAddress("127.0.0.1", 27018)));
116-
117-
try {
118-
if (isStandalone(mongo)) {
119-
return;
120-
}
121-
122-
String primary = getPrimaryAsString(mongo);
123-
124-
DB db = mongo.getDB("secondaryTest");
125-
db.setReadPreference(ReadPreference.SECONDARY);
126-
CommandResult result = db.command("ping");
127-
assertNotEquals(primary, result.get("serverUsed"));
128-
} finally {
129-
mongo.close();
130-
}
131-
}
113+
// @Test
114+
// public void testCommandToSecondary() throws MongoException, UnknownHostException {
115+
// Mongo mongo = new Mongo(Arrays.asList(new ServerAddress("127.0.0.1"), new ServerAddress("127.0.0.1", 27018)));
116+
//
117+
// try {
118+
// if (isStandalone(mongo)) {
119+
// return;
120+
// }
121+
//
122+
// String primary = getPrimaryAsString(mongo);
123+
//
124+
// DB db = mongo.getDB("secondaryTest");
125+
// db.setReadPreference(ReadPreference.SECONDARY);
126+
// CommandResult result = db.command("ping");
127+
// assertNotEquals(primary, result.get("serverUsed"));
128+
// } finally {
129+
// mongo.close();
130+
// }
131+
// }
132132

133133
@Test
134134
public void testGetCollectionNamesToSecondary() throws MongoException, UnknownHostException {

0 commit comments

Comments
 (0)