Skip to content

Commit 982d14d

Browse files
committed
Ignore arbiters entirely in SecondaryReadTest
1 parent 648cdce commit 982d14d

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/test/com/mongodb/SecondaryReadTest.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,6 +181,9 @@ private List<TestHost> extractHosts(Mongo mongo) {
181181
}
182182

183183
String stateStr = member.getString("stateStr");
184+
if (stateStr.equalsIgnoreCase("arbiter")) {
185+
continue;
186+
}
184187
pHosts.add(new TestHost(hostnameAndPort, stateStr));
185188
}
186189

@@ -238,7 +241,7 @@ private void verifySecondaryCounts(final int pSecondaryCount, final List<TestHos
238241
private static void loadQueryCount(final List<TestHost> pHosts, final boolean pBefore) throws Exception {
239242
for (TestHost testHost : pHosts) {
240243
Mongo mongoHost;
241-
if (getMongoClientURI().getCredentials() == null || testHost.stateStr.equals("ARBITER")) {
244+
if (getMongoClientURI().getCredentials() == null) {
242245
mongoHost = new MongoClient(testHost.hostnameAndPort);
243246
} else {
244247
mongoHost = new MongoClient(new ServerAddress(testHost.hostnameAndPort), asList(getMongoClientURI().getCredentials()));

0 commit comments

Comments
 (0)