Skip to content

Commit ee60b45

Browse files
committed
update green framework tests
1 parent 7dd8ce1 commit ee60b45

File tree

3 files changed

+43
-56
lines changed

3 files changed

+43
-56
lines changed

.evergreen/generated_configs/tasks.yml

Lines changed: 22 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -503,17 +503,29 @@ tasks:
503503
tags: [mockupdb]
504504

505505
# Mod wsgi tests
506-
- name: mod-wsgi-standalone
506+
- name: mod-wsgi-replica-set-python3.9
507507
commands:
508508
- func: run server
509509
vars:
510-
TOPOLOGY: standalone
510+
TOPOLOGY: replica_set
511511
- func: run tests
512512
vars:
513513
TEST_NAME: mod_wsgi
514514
SUB_TEST_NAME: standalone
515+
PYTHON_VERSION: "3.9"
516+
tags: [mod_wsgi]
517+
- name: mod-wsgi-embedded-mode-replica-set-python3.10
518+
commands:
519+
- func: run server
520+
vars:
521+
TOPOLOGY: replica_set
522+
- func: run tests
523+
vars:
524+
TEST_NAME: mod_wsgi
525+
SUB_TEST_NAME: embedded
526+
PYTHON_VERSION: "3.10"
515527
tags: [mod_wsgi]
516-
- name: mod-wsgi-replica-set
528+
- name: mod-wsgi-replica-set-python3.11
517529
commands:
518530
- func: run server
519531
vars:
@@ -522,26 +534,29 @@ tasks:
522534
vars:
523535
TEST_NAME: mod_wsgi
524536
SUB_TEST_NAME: standalone
537+
PYTHON_VERSION: "3.11"
525538
tags: [mod_wsgi]
526-
- name: mod-wsgi-embedded-mode-standalone
539+
- name: mod-wsgi-embedded-mode-replica-set-python3.12
527540
commands:
528541
- func: run server
529542
vars:
530-
TOPOLOGY: standalone
543+
TOPOLOGY: replica_set
531544
- func: run tests
532545
vars:
533546
TEST_NAME: mod_wsgi
534547
SUB_TEST_NAME: embedded
548+
PYTHON_VERSION: "3.12"
535549
tags: [mod_wsgi]
536-
- name: mod-wsgi-embedded-mode-replica-set
550+
- name: mod-wsgi-replica-set-python3.13
537551
commands:
538552
- func: run server
539553
vars:
540554
TOPOLOGY: replica_set
541555
- func: run tests
542556
vars:
543557
TEST_NAME: mod_wsgi
544-
SUB_TEST_NAME: embedded
558+
SUB_TEST_NAME: standalone
559+
PYTHON_VERSION: "3.13"
545560
tags: [mod_wsgi]
546561

547562
# No server tests

.evergreen/generated_configs/variants.yml

Lines changed: 8 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -484,39 +484,26 @@ buildvariants:
484484
PYTHON_BINARY: /Library/Frameworks/PythonT.Framework/Versions/3.13/bin/python3t
485485

486486
# Green framework tests
487-
- name: green-eventlet-rhel8-python3.9
487+
- name: green-eventlet-rhel8
488488
tasks:
489-
- name: .standalone .noauth .nossl .sync_async
490-
display_name: Green Eventlet RHEL8 Python3.9
489+
- name: .standard-linux .standalone-noauth-nossl .python-3.9
490+
display_name: Green Eventlet RHEL8
491491
run_on:
492492
- rhel87-small
493493
expansions:
494494
GREEN_FRAMEWORK: eventlet
495495
AUTH: auth
496496
SSL: ssl
497-
PYTHON_BINARY: /opt/python/3.9/bin/python3
498-
- name: green-gevent-rhel8-python3.9
499-
tasks:
500-
- name: .standalone .noauth .nossl .sync_async
501-
display_name: Green Gevent RHEL8 Python3.9
502-
run_on:
503-
- rhel87-small
504-
expansions:
505-
GREEN_FRAMEWORK: gevent
506-
AUTH: auth
507-
SSL: ssl
508-
PYTHON_BINARY: /opt/python/3.9/bin/python3
509-
- name: green-gevent-rhel8-python3.13
497+
- name: green-gevent-rhel8
510498
tasks:
511-
- name: .standalone .noauth .nossl .sync_async
512-
display_name: Green Gevent RHEL8 Python3.13
499+
- name: .standard-linux .standalone-noauth-nossl
500+
display_name: Green Gevent RHEL8
513501
run_on:
514502
- rhel87-small
515503
expansions:
516504
GREEN_FRAMEWORK: gevent
517505
AUTH: auth
518506
SSL: ssl
519-
PYTHON_BINARY: /opt/python/3.13/bin/python3
520507

521508
# Import time tests
522509
- name: import-time
@@ -559,24 +546,14 @@ buildvariants:
559546
PYTHON_BINARY: /opt/python/3.9/bin/python3
560547

561548
# Mod wsgi tests
562-
- name: mod_wsgi-ubuntu-22-python3.9
549+
- name: mod_wsgi-ubuntu-22
563550
tasks:
564551
- name: .mod_wsgi
565-
display_name: mod_wsgi Ubuntu-22 Python3.9
552+
display_name: mod_wsgi Ubuntu-22
566553
run_on:
567554
- ubuntu2204-small
568555
expansions:
569556
MOD_WSGI_VERSION: "4"
570-
PYTHON_BINARY: /opt/python/3.9/bin/python3
571-
- name: mod_wsgi-ubuntu-22-python3.13
572-
tasks:
573-
- name: .mod_wsgi
574-
display_name: mod_wsgi Ubuntu-22 Python3.13
575-
run_on:
576-
- ubuntu2204-small
577-
expansions:
578-
MOD_WSGI_VERSION: "4"
579-
PYTHON_BINARY: /opt/python/3.13/bin/python3
580557

581558
# No c ext tests
582559
- name: no-c-ext-rhel8

.evergreen/scripts/generate_config.py

Lines changed: 13 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -340,18 +340,16 @@ def create_stable_api_variants():
340340

341341
def create_green_framework_variants():
342342
variants = []
343-
tasks = [".standalone .noauth .nossl .sync_async"]
344343
host = DEFAULT_HOST
345-
for python, framework in product([CPYTHONS[0], CPYTHONS[-1]], ["eventlet", "gevent"]):
346-
if framework == "eventlet" and python == CPYTHONS[-1]:
344+
for framework in ["eventlet", "gevent"]:
345+
tasks = [".standard-linux .standalone-noauth-nossl"]
346+
if framework == "eventlet":
347347
# Eventlet has issues with dnspython > 2.0 and newer versions of CPython
348348
# https://jira.mongodb.org/browse/PYTHON-5284
349-
continue
349+
tasks = [".standard-linux .standalone-noauth-nossl .python-3.9"]
350350
expansions = dict(GREEN_FRAMEWORK=framework, AUTH="auth", SSL="ssl")
351-
display_name = get_variant_name(f"Green {framework.capitalize()}", host, python=python)
352-
variant = create_variant(
353-
tasks, display_name, host=host, python=python, expansions=expansions
354-
)
351+
display_name = get_variant_name(f"Green {framework.capitalize()}", host)
352+
variant = create_variant(tasks, display_name, host=host, expansions=expansions)
355353
variants.append(variant)
356354
return variants
357355

@@ -377,17 +375,11 @@ def create_atlas_data_lake_variants():
377375

378376

379377
def create_mod_wsgi_variants():
380-
variants = []
381378
host = HOSTS["ubuntu22"]
382379
tasks = [".mod_wsgi"]
383380
expansions = dict(MOD_WSGI_VERSION="4")
384-
for python in MIN_MAX_PYTHON:
385-
display_name = get_variant_name("mod_wsgi", host, python=python)
386-
variant = create_variant(
387-
tasks, display_name, host=host, python=python, expansions=expansions
388-
)
389-
variants.append(variant)
390-
return variants
381+
display_name = get_variant_name("mod_wsgi", host)
382+
return [create_variant(tasks, display_name, host=host, expansions=expansions)]
391383

392384

393385
def create_disable_test_commands_variants():
@@ -798,15 +790,18 @@ def create_oidc_tasks():
798790

799791
def create_mod_wsgi_tasks():
800792
tasks = []
801-
for test, topology in product(["standalone", "embedded-mode"], ["standalone", "replica_set"]):
793+
for (test, topology), python in zip_cycle(
794+
product(["standalone", "embedded-mode"], ["standalone", "replica_set"]), CPYTHONS
795+
):
802796
if test == "standalone":
803797
task_name = "mod-wsgi-"
804798
else:
805799
task_name = "mod-wsgi-embedded-mode-"
806800
task_name += topology.replace("_", "-")
801+
task_name = get_task_name(task_name, python=python)
807802
server_vars = dict(TOPOLOGY=topology)
808803
server_func = FunctionCall(func="run server", vars=server_vars)
809-
vars = dict(TEST_NAME="mod_wsgi", SUB_TEST_NAME=test.split("-")[0])
804+
vars = dict(TEST_NAME="mod_wsgi", SUB_TEST_NAME=test.split("-")[0], PYTHON_VERSION=python)
810805
test_func = FunctionCall(func="run tests", vars=vars)
811806
tags = ["mod_wsgi"]
812807
commands = [server_func, test_func]

0 commit comments

Comments
 (0)