-
Notifications
You must be signed in to change notification settings - Fork 1.1k
PYTHON-3088 [v3.13] Update load balancer tests to support dedicated load balancer port #870
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 6 commits
3ef53d1
f7d757d
55091f1
0fe4ba7
14329ac
584ad4d
b9f8972
7ad31cb
6a518b9
7927e52
00d8ec5
70671f5
77ecfb3
a2b383d
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -291,6 +291,7 @@ functions: | |
DISABLE_TEST_COMMANDS=${DISABLE_TEST_COMMANDS} \ | ||
ORCHESTRATION_FILE=${ORCHESTRATION_FILE} \ | ||
REQUIRE_API_VERSION=${REQUIRE_API_VERSION} \ | ||
LOAD_BALANCER=${LOAD_BALANCER} \ | ||
bash ${DRIVERS_TOOLS}/.evergreen/run-orchestration.sh | ||
# run-orchestration generates expansion file with the MONGODB_URI for the cluster | ||
- command: expansions.update | ||
|
@@ -423,6 +424,7 @@ functions: | |
fi | ||
if [ -n "${test_loadbalancer}" ]; then | ||
export TEST_LOADBALANCER=1 | ||
export LOAD_BALANCER=1 | ||
export SINGLE_MONGOS_LB_URI="${SINGLE_MONGOS_LB_URI}" | ||
export MULTI_MONGOS_LB_URI="${MULTI_MONGOS_LB_URI}" | ||
fi | ||
|
@@ -1770,8 +1772,12 @@ tasks: | |
commands: | ||
- func: "bootstrap mongo-orchestration" | ||
vars: | ||
VERSION: "latest" | ||
TOPOLOGY: "sharded_cluster" | ||
LOAD_BALANCER: true | ||
- func: "run load-balancer" | ||
vars: | ||
LOAD_BALANCER: true | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I don't think vars/LOAD_BALANCER is needed for "run load-balancer". There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Done. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. LOAD_BALANCER is not needed for "run tests" either is it? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The ticket states
Which I interpreted as requiring us to set it to true for the test run as well. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. LOAD_BALANCER is only needed for run-orchestration.sh. Let's remove it here. Note we can also remove the |
||
- func: "run tests" | ||
# }}} | ||
- name: "coverage-report" | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -220,9 +220,6 @@ def _set_keepalive_times(sock): | |
# main thread, to avoid the deadlock. See PYTHON-607. | ||
u'foo'.encode('idna') | ||
|
||
# Remove after PYTHON-2712 | ||
_MOCK_SERVICE_ID = False | ||
|
||
|
||
def _raise_connection_failure(address, error, msg_prefix=None): | ||
"""Convert a socket.error to ConnectionFailure and raise it.""" | ||
|
@@ -584,12 +581,7 @@ def _hello(self, cluster_time, topology_version, | |
if auth_ctx: | ||
cmd['speculativeAuthenticate'] = auth_ctx.speculate_command() | ||
|
||
doc = self.command('admin', cmd, publish_events=False, | ||
exhaust_allowed=awaitable) | ||
# PYTHON-2712 will remove this topologyVersion fallback logic. | ||
if self.opts.load_balanced and _MOCK_SERVICE_ID: | ||
process_id = doc.get('topologyVersion', {}).get('processId') | ||
doc.setdefault('serviceId', process_id) | ||
doc = self.command("admin", cmd, publish_events=False, exhaust_allowed=awaitable) | ||
if not self.opts.load_balanced: | ||
doc.pop('serviceId', None) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Should this be removed now too? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Done. And removed another occurrence. |
||
hello = IsMaster(doc, awaitable=awaitable) | ||
|
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
VERSION should not be here. The VERSION gets set in the matrix here:
We'll need to fix this in master and v4.0 as well.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We also need to change "5.0" to "rapid". We can no longer test load-balancer support against 5.0. The only reason the test passed is because the above bug makes it so that the "5.0" test are actually using "latest".
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.