diff --git a/.evergreen/generated_configs/tasks.yml b/.evergreen/generated_configs/tasks.yml index 4676ab80f3..20bdc2165f 100644 --- a/.evergreen/generated_configs/tasks.yml +++ b/.evergreen/generated_configs/tasks.yml @@ -1,28 +1,4 @@ tasks: - # Atlas connect tests - - name: test-atlas-connect - commands: - - func: assume ec2 role - - func: run tests - vars: - TEST_NAME: atlas_connect - tags: [atlas_connect] - - # Atlas data lake tests - - name: test-atlas-data-lake-without_ext - commands: - - func: run tests - vars: - TEST_NAME: data_lake - NO_EXT: "1" - tags: [atlas_data_lake] - - name: test-atlas-data-lake-with_ext - commands: - - func: run tests - vars: - TEST_NAME: data_lake - tags: [atlas_data_lake] - # Aws lambda tests - name: test-aws-lambda-deployed commands: @@ -1068,14 +1044,6 @@ tasks: TEST_NAME: load_balancer tags: [load-balancer, noauth, nossl] - # Mockupdb tests - - name: test-mockupdb - commands: - - func: run tests - vars: - TEST_NAME: mockupdb - tags: [mockupdb] - # Mod wsgi tests - name: mod-wsgi-standalone commands: @@ -1118,11 +1086,28 @@ tasks: SUB_TEST_NAME: embedded tags: [mod_wsgi] - # No server tests - - name: test-no-server + # No orchestration tests + - name: test-no-orchestration-python3.9 + commands: + - func: assume ec2 role + - func: run tests + vars: + PYTHON_VERSION: "3.9" + tags: [no-orchestration, python-3.9] + - name: test-no-orchestration-python3.13 + commands: + - func: assume ec2 role + - func: run tests + vars: + PYTHON_VERSION: "3.13" + tags: [no-orchestration, python-3.13] + - name: test-no-orchestration-pypy3.10 commands: + - func: assume ec2 role - func: run tests - tags: [no-server] + vars: + PYTHON_VERSION: pypy3.10 + tags: [no-orchestration, python-pypy3.10] # Ocsp tests - name: test-ocsp-ecdsa-valid-cert-server-does-not-staple-v4.4-python3.9 diff --git a/.evergreen/generated_configs/variants.yml b/.evergreen/generated_configs/variants.yml index 0855a27636..cb6f8e4aa8 100644 --- a/.evergreen/generated_configs/variants.yml +++ b/.evergreen/generated_configs/variants.yml @@ -64,40 +64,22 @@ buildvariants: NO_EXT: "1" # Atlas connect tests - - name: atlas-connect-rhel8-python3.9 + - name: atlas-connect-rhel8 tasks: - - name: .atlas_connect - display_name: Atlas connect RHEL8 Python3.9 + - name: .no-orchestration + display_name: Atlas connect RHEL8 run_on: - rhel87-small - expansions: - PYTHON_BINARY: /opt/python/3.9/bin/python3 - - name: atlas-connect-rhel8-python3.13 - tasks: - - name: .atlas_connect - display_name: Atlas connect RHEL8 Python3.13 - run_on: - - rhel87-small - expansions: - PYTHON_BINARY: /opt/python/3.13/bin/python3 # Atlas data lake tests - - name: atlas-data-lake-ubuntu-22-python3.9 + - name: atlas-data-lake-ubuntu-22 tasks: - - name: .atlas_data_lake - display_name: Atlas Data Lake Ubuntu-22 Python3.9 + - name: .no-orchestration + display_name: Atlas Data Lake Ubuntu-22 run_on: - ubuntu2204-small expansions: - PYTHON_BINARY: /opt/python/3.9/bin/python3 - - name: atlas-data-lake-ubuntu-22-python3.13 - tasks: - - name: .atlas_data_lake - display_name: Atlas Data Lake Ubuntu-22 Python3.13 - run_on: - - ubuntu2204-small - expansions: - PYTHON_BINARY: /opt/python/3.13/bin/python3 + TEST_NAME: data_lake # Aws auth tests - name: auth-aws-ubuntu-20-python3.9 @@ -579,14 +561,14 @@ buildvariants: batchtime: 10080 # Mockupdb tests - - name: mockupdb-rhel8-python3.9 + - name: mockupdb-rhel8 tasks: - - name: .mockupdb - display_name: MockupDB RHEL8 Python3.9 + - name: .no-orchestration + display_name: MockupDB RHEL8 run_on: - rhel87-small expansions: - PYTHON_BINARY: /opt/python/3.9/bin/python3 + TEST_NAME: mockupdb # Mod wsgi tests - name: mod_wsgi-ubuntu-22-python3.9 @@ -617,10 +599,10 @@ buildvariants: - rhel87-small # No server tests - - name: no-server + - name: no-server-rhel8 tasks: - - name: .no-server - display_name: No server + - name: .no-orchestration + display_name: No server RHEL8 run_on: - rhel87-small diff --git a/.evergreen/scripts/generate_config.py b/.evergreen/scripts/generate_config.py index b6bd5dce26..7fe2e2e3d8 100644 --- a/.evergreen/scripts/generate_config.py +++ b/.evergreen/scripts/generate_config.py @@ -366,14 +366,11 @@ def create_no_c_ext_variants(): def create_atlas_data_lake_variants(): - variants = [] host = HOSTS["ubuntu22"] - for python in MIN_MAX_PYTHON: - tasks = [".atlas_data_lake"] - display_name = get_variant_name("Atlas Data Lake", host, python=python) - variant = create_variant(tasks, display_name, host=host, python=python) - variants.append(variant) - return variants + tasks = [".no-orchestration"] + expansions = dict(TEST_NAME="data_lake") + display_name = get_variant_name("Atlas Data Lake", host) + return [create_variant(tasks, display_name, host=host, expansions=expansions)] def create_mod_wsgi_variants(): @@ -450,13 +447,13 @@ def create_search_index_variants(): def create_mockupdb_variants(): host = DEFAULT_HOST - python = CPYTHONS[0] + expansions = dict(TEST_NAME="mockupdb") return [ create_variant( - [".mockupdb"], - get_variant_name("MockupDB", host, python=python), - python=python, + [".no-orchestration"], + get_variant_name("MockupDB", host), host=host, + expansions=expansions, ) ] @@ -478,12 +475,10 @@ def create_atlas_connect_variants(): host = DEFAULT_HOST return [ create_variant( - [".atlas_connect"], - get_variant_name("Atlas connect", host, python=python), - python=python, - host=host, + [".no-orchestration"], + get_variant_name("Atlas connect", host), + host=DEFAULT_HOST, ) - for python in MIN_MAX_PYTHON ] @@ -539,7 +534,8 @@ def create_aws_auth_variants(): def create_no_server_variants(): host = HOSTS["rhel8"] - return [create_variant([".no-server"], "No server", host=host)] + name = get_variant_name("No server", host=host) + return [create_variant([".no-orchestration"], name, host=host)] def create_alternative_hosts_variants(): @@ -705,6 +701,22 @@ def create_server_tasks(): return tasks +def create_no_orchestration_tasks(): + tasks = [] + for python in [*MIN_MAX_PYTHON, PYPYS[-1]]: + tags = [ + "no-orchestration", + f"python-{python}", + ] + name = get_task_name("test-no-orchestration", python=python) + assume_func = FunctionCall(func="assume ec2 role") + test_vars = dict(PYTHON_VERSION=python) + test_func = FunctionCall(func="run tests", vars=test_vars) + commands = [assume_func, test_func] + tasks.append(EvgTask(name=name, tags=tags, commands=commands)) + return tasks + + def create_load_balancer_tasks(): tasks = [] for (auth, ssl), version in product(AUTH_SSLS, get_versions_from("6.0")): @@ -863,15 +875,6 @@ def create_search_index_tasks(): return [EvgTask(name=task_name, tags=tags, commands=commands)] -def create_atlas_connect_tasks(): - vars = dict(TEST_NAME="atlas_connect") - assume_func = FunctionCall(func="assume ec2 role") - test_func = FunctionCall(func="run tests", vars=vars) - task_name = "test-atlas-connect" - tags = ["atlas_connect"] - return [EvgTask(name=task_name, tags=tags, commands=[assume_func, test_func])] - - def create_enterprise_auth_tasks(): tasks = [] for python in [*MIN_MAX_PYTHON, PYPYS[-1]]: @@ -909,18 +912,6 @@ def create_perf_tasks(): return tasks -def create_atlas_data_lake_tasks(): - tags = ["atlas_data_lake"] - tasks = [] - for c_ext in C_EXTS: - vars = dict(TEST_NAME="data_lake") - handle_c_ext(c_ext, vars) - test_func = FunctionCall(func="run tests", vars=vars) - task_name = f"test-atlas-data-lake-{c_ext}" - tasks.append(EvgTask(name=task_name, tags=tags, commands=[test_func])) - return tasks - - def create_getdata_tasks(): # Wildcard task. Do you need to find out what tools are available and where? # Throw it here, and execute this task on all buildvariants @@ -1000,20 +991,6 @@ def create_ocsp_tasks(): return tasks -def create_mockupdb_tasks(): - test_func = FunctionCall(func="run tests", vars=dict(TEST_NAME="mockupdb")) - task_name = "test-mockupdb" - tags = ["mockupdb"] - return [EvgTask(name=task_name, tags=tags, commands=[test_func])] - - -def create_no_server_tasks(): - test_func = FunctionCall(func="run tests") - task_name = "test-no-server" - tags = ["no-server"] - return [EvgTask(name=task_name, tags=tags, commands=[test_func])] - - def create_free_threading_tasks(): vars = dict(VERSION="8.0", TOPOLOGY="replica_set") server_func = FunctionCall(func="run server", vars=vars) diff --git a/test/__init__.py b/test/__init__.py index a1c5091f3b..7ae3432062 100644 --- a/test/__init__.py +++ b/test/__init__.py @@ -206,6 +206,7 @@ def _init_client(self): if os.environ.get("TEST_DATA_LAKE"): self.is_data_lake = True self.auth_enabled = True + self.client.close() self.client = self._connect(host, port, username=db_user, password=db_pwd) self.connected = True return diff --git a/test/asynchronous/__init__.py b/test/asynchronous/__init__.py index f8d04f0d5d..c57bf2a880 100644 --- a/test/asynchronous/__init__.py +++ b/test/asynchronous/__init__.py @@ -206,6 +206,7 @@ async def _init_client(self): if os.environ.get("TEST_DATA_LAKE"): self.is_data_lake = True self.auth_enabled = True + await self.client.close() self.client = await self._connect(host, port, username=db_user, password=db_pwd) self.connected = True return