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:
223
223
params :
224
224
script : |
225
225
${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
227
227
# run-orchestration generates expansion file with the MONGODB_URI for the cluster
228
228
- command : expansions.update
229
229
params :
@@ -828,6 +828,8 @@ tasks:
828
828
- name : load-balancer-test
829
829
commands :
830
830
- func : " bootstrap mongo-orchestration"
831
+ vars :
832
+ LOAD_BALANCER : ' true'
831
833
- func : " run load-balancer"
832
834
- func : " run load-balancer tests"
833
835
Original file line number Diff line number Diff line change 42
42
import java .util .Map ;
43
43
import java .util .Set ;
44
44
45
- import static com .mongodb .assertions .Assertions .assertNotNull ;
46
45
import static com .mongodb .connection .ConnectionDescription .getDefaultMaxMessageSize ;
47
46
import static com .mongodb .connection .ConnectionDescription .getDefaultMaxWriteBatchSize ;
48
47
import static com .mongodb .connection .ServerConnectionState .CONNECTED ;
60
59
import static java .util .concurrent .TimeUnit .NANOSECONDS ;
61
60
62
61
public final class DescriptionHelper {
63
-
64
- private static volatile boolean manufactureServiceId = false ;
65
-
66
- public static void enableServiceIdManufacturing () {
67
- manufactureServiceId = true ;
68
- }
69
-
70
62
static ConnectionDescription createConnectionDescription (final ClusterConnectionMode clusterConnectionMode ,
71
63
final ConnectionId connectionId , final BsonDocument helloResult ) {
72
64
ConnectionDescription connectionDescription = new ConnectionDescription (connectionId ,
@@ -82,10 +74,6 @@ static ConnectionDescription createConnectionDescription(final ClusterConnection
82
74
ObjectId serviceId = getServiceId (helloResult );
83
75
if (serviceId != null ) {
84
76
connectionDescription = connectionDescription .withServiceId (serviceId );
85
- } else if (manufactureServiceId ) {
86
- TopologyVersion topologyVersion = getTopologyVersion (helloResult );
87
- assertNotNull (topologyVersion );
88
- connectionDescription = connectionDescription .withServiceId (topologyVersion .getProcessId ());
89
77
} else {
90
78
throw new MongoClientException ("Driver attempted to initialize in load balancing mode, but the server does not support "
91
79
+ "this mode" );
Original file line number Diff line number Diff line change 87
87
import static com .mongodb .connection .ClusterType .STANDALONE ;
88
88
import static com .mongodb .internal .connection .ClusterDescriptionHelper .getPrimaries ;
89
89
import static com .mongodb .internal .connection .ClusterDescriptionHelper .getSecondaries ;
90
- import static com .mongodb .internal .connection .DescriptionHelper .enableServiceIdManufacturing ;
91
90
import static java .lang .String .format ;
92
91
import static java .lang .Thread .sleep ;
93
92
import static java .util .Arrays .asList ;
@@ -128,14 +127,6 @@ public final class ClusterFixture {
128
127
129
128
static {
130
129
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
- }
139
130
}
140
131
141
132
private ClusterFixture () {
You can’t perform that action at this time.
0 commit comments