Skip to content

Commit ab40131

Browse files
committed
JAVA-1161: Added assertion that a replica set member without a name or hosts list will be of type ReplicaSetOther
1 parent df86686 commit ab40131

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/test/com/mongodb/MultiServerClusterSpecification.groovy

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,7 @@ class MultiServerClusterSpecification extends Specification {
125125
then:
126126
getClusterDescription(cluster).type == ReplicaSet
127127
getClusterDescription(cluster).all == getServerDescriptions(firstServer, secondServer)
128+
getClusterDescription(cluster).getByServerAddress(secondServer).getType() == ReplicaSetOther
128129
}
129130

130131
def 'should ignore a host without a replica set name when type is replica set'() {
@@ -139,6 +140,7 @@ class MultiServerClusterSpecification extends Specification {
139140
then:
140141
getClusterDescription(cluster).type == ReplicaSet
141142
getClusterDescription(cluster).all == getServerDescriptions(firstServer, secondServer)
143+
getClusterDescription(cluster).getByServerAddress(secondServer).getType() == ReplicaSetOther
142144
}
143145

144146
def 'should remove a server of the wrong type when type is sharded'() {

0 commit comments

Comments
 (0)