File tree Expand file tree Collapse file tree 3 files changed +3
-22
lines changed
main/com/mongodb/internal/connection
test/functional/com/mongodb Expand file tree Collapse file tree 3 files changed +3
-22
lines changed Original file line number Diff line number Diff line change @@ -223,7 +223,7 @@ functions:
223223 params :
224224 script : |
225225 ${PREPARE_SHELL}
226- REQUIRE_API_VERSION=${REQUIRE_API_VERSION} MONGODB_VERSION=${VERSION} TOPOLOGY=${TOPOLOGY} AUTH=${AUTH} SSL=${SSL} STORAGE_ENGINE=${STORAGE_ENGINE} ORCHESTRATION_FILE=${ORCHESTRATION_FILE} sh ${DRIVERS_TOOLS}/.evergreen/run-orchestration.sh
226+ REQUIRE_API_VERSION=${REQUIRE_API_VERSION} LOAD_BALANCER=${LOAD_BALANCER} MONGODB_VERSION=${VERSION} TOPOLOGY=${TOPOLOGY} AUTH=${AUTH} SSL=${SSL} STORAGE_ENGINE=${STORAGE_ENGINE} ORCHESTRATION_FILE=${ORCHESTRATION_FILE} sh ${DRIVERS_TOOLS}/.evergreen/run-orchestration.sh
227227 # run-orchestration generates expansion file with the MONGODB_URI for the cluster
228228 - command : expansions.update
229229 params :
@@ -828,6 +828,8 @@ tasks:
828828 - name : load-balancer-test
829829 commands :
830830 - func : " bootstrap mongo-orchestration"
831+ vars :
832+ LOAD_BALANCER : ' true'
831833 - func : " run load-balancer"
832834 - func : " run load-balancer tests"
833835
Original file line number Diff line number Diff line change 4242import java .util .Map ;
4343import java .util .Set ;
4444
45- import static com .mongodb .assertions .Assertions .assertNotNull ;
4645import static com .mongodb .connection .ConnectionDescription .getDefaultMaxMessageSize ;
4746import static com .mongodb .connection .ConnectionDescription .getDefaultMaxWriteBatchSize ;
4847import static com .mongodb .connection .ServerConnectionState .CONNECTED ;
6059import static java .util .concurrent .TimeUnit .NANOSECONDS ;
6160
6261public final class DescriptionHelper {
63-
64- private static volatile boolean manufactureServiceId = false ;
65-
66- public static void enableServiceIdManufacturing () {
67- manufactureServiceId = true ;
68- }
69-
7062 static ConnectionDescription createConnectionDescription (final ClusterConnectionMode clusterConnectionMode ,
7163 final ConnectionId connectionId , final BsonDocument helloResult ) {
7264 ConnectionDescription connectionDescription = new ConnectionDescription (connectionId ,
@@ -82,10 +74,6 @@ static ConnectionDescription createConnectionDescription(final ClusterConnection
8274 ObjectId serviceId = getServiceId (helloResult );
8375 if (serviceId != null ) {
8476 connectionDescription = connectionDescription .withServiceId (serviceId );
85- } else if (manufactureServiceId ) {
86- TopologyVersion topologyVersion = getTopologyVersion (helloResult );
87- assertNotNull (topologyVersion );
88- connectionDescription = connectionDescription .withServiceId (topologyVersion .getProcessId ());
8977 } else {
9078 throw new MongoClientException ("Driver attempted to initialize in load balancing mode, but the server does not support "
9179 + "this mode" );
Original file line number Diff line number Diff line change 8787import static com .mongodb .connection .ClusterType .STANDALONE ;
8888import static com .mongodb .internal .connection .ClusterDescriptionHelper .getPrimaries ;
8989import static com .mongodb .internal .connection .ClusterDescriptionHelper .getSecondaries ;
90- import static com .mongodb .internal .connection .DescriptionHelper .enableServiceIdManufacturing ;
9190import static java .lang .String .format ;
9291import static java .lang .Thread .sleep ;
9392import static java .util .Arrays .asList ;
@@ -128,14 +127,6 @@ public final class ClusterFixture {
128127
129128 static {
130129 Runtime .getRuntime ().addShutdownHook (new ShutdownHook ());
131-
132- ConnectionString defaultConnectionString = getConnectionStringFromSystemProperty (MONGODB_URI_SYSTEM_PROPERTY_NAME );
133- if (defaultConnectionString != null ) {
134- Boolean loadBalanced = defaultConnectionString .isLoadBalanced ();
135- if (loadBalanced != null && loadBalanced ) {
136- enableServiceIdManufacturing ();
137- }
138- }
139130 }
140131
141132 private ClusterFixture () {
You can’t perform that action at this time.
0 commit comments