diff --git a/.evergreen/generated_configs/tasks.yml b/.evergreen/generated_configs/tasks.yml index 8bc758890a..0ecf956dd1 100644 --- a/.evergreen/generated_configs/tasks.yml +++ b/.evergreen/generated_configs/tasks.yml @@ -3071,558 +3071,492 @@ tasks: tags: [serverless] # Standard tests - - name: test-standard-v4.0-python3.9-sync-noauth-nossl-standalone + - name: test-standard-v4.2-python3.9-sync-noauth-nossl-standalone commands: - func: run server vars: AUTH: noauth SSL: nossl TOPOLOGY: standalone - VERSION: "4.0" + VERSION: "4.2" - func: run tests vars: AUTH: noauth SSL: nossl TOPOLOGY: standalone - VERSION: "4.0" + VERSION: "4.2" PYTHON_VERSION: "3.9" TEST_NAME: default_sync tags: - test-standard - - server-4.0 + - server-4.2 - python-3.9 - standalone-noauth-nossl - sync - - name: test-standard-v4.0-python3.10-async-noauth-ssl-replica-set + - name: test-standard-v4.2-python3.10-async-noauth-ssl-replica-set commands: - func: run server vars: AUTH: noauth SSL: ssl TOPOLOGY: replica_set - VERSION: "4.0" + VERSION: "4.2" - func: run tests vars: AUTH: noauth SSL: ssl TOPOLOGY: replica_set - VERSION: "4.0" + VERSION: "4.2" PYTHON_VERSION: "3.10" TEST_NAME: default_async tags: - test-standard - - server-4.0 + - server-4.2 - python-3.10 - replica_set-noauth-ssl - async - - name: test-standard-v4.0-python3.11-sync-auth-ssl-sharded-cluster + - name: test-standard-v4.2-python3.11-sync-auth-ssl-sharded-cluster commands: - func: run server vars: AUTH: auth SSL: ssl TOPOLOGY: sharded_cluster - VERSION: "4.0" + VERSION: "4.2" - func: run tests vars: AUTH: auth SSL: ssl TOPOLOGY: sharded_cluster - VERSION: "4.0" + VERSION: "4.2" PYTHON_VERSION: "3.11" TEST_NAME: default_sync tags: - test-standard - - server-4.0 + - server-4.2 - python-3.11 - sharded_cluster-auth-ssl - sync - - name: test-standard-v4.2-python3.12-async-noauth-nossl-standalone + - name: test-standard-v4.4-python3.12-async-noauth-nossl-standalone commands: - func: run server vars: AUTH: noauth SSL: nossl TOPOLOGY: standalone - VERSION: "4.2" + VERSION: "4.4" - func: run tests vars: AUTH: noauth SSL: nossl TOPOLOGY: standalone - VERSION: "4.2" + VERSION: "4.4" PYTHON_VERSION: "3.12" TEST_NAME: default_async tags: - test-standard - - server-4.2 + - server-4.4 - python-3.12 - standalone-noauth-nossl - async - - name: test-standard-v4.2-python3.13-sync-noauth-ssl-replica-set + - name: test-standard-v4.4-python3.13-sync-noauth-ssl-replica-set commands: - func: run server vars: AUTH: noauth SSL: ssl TOPOLOGY: replica_set - VERSION: "4.2" + VERSION: "4.4" - func: run tests vars: AUTH: noauth SSL: ssl TOPOLOGY: replica_set - VERSION: "4.2" + VERSION: "4.4" PYTHON_VERSION: "3.13" TEST_NAME: default_sync tags: - test-standard - - server-4.2 + - server-4.4 - python-3.13 - replica_set-noauth-ssl - sync - - name: test-standard-v4.2-python3.9-async-auth-ssl-sharded-cluster + - name: test-standard-v4.4-python3.9-async-auth-ssl-sharded-cluster commands: - func: run server vars: AUTH: auth SSL: ssl TOPOLOGY: sharded_cluster - VERSION: "4.2" + VERSION: "4.4" - func: run tests vars: AUTH: auth SSL: ssl TOPOLOGY: sharded_cluster - VERSION: "4.2" + VERSION: "4.4" PYTHON_VERSION: "3.9" TEST_NAME: default_async tags: - test-standard - - server-4.2 + - server-4.4 - python-3.9 - sharded_cluster-auth-ssl - async - - name: test-standard-v4.4-python3.10-sync-noauth-nossl-standalone + - name: test-standard-v5.0-python3.10-sync-noauth-nossl-standalone commands: - func: run server vars: AUTH: noauth SSL: nossl TOPOLOGY: standalone - VERSION: "4.4" + VERSION: "5.0" - func: run tests vars: AUTH: noauth SSL: nossl TOPOLOGY: standalone - VERSION: "4.4" + VERSION: "5.0" PYTHON_VERSION: "3.10" TEST_NAME: default_sync tags: - test-standard - - server-4.4 + - server-5.0 - python-3.10 - standalone-noauth-nossl - sync - - name: test-standard-v4.4-python3.11-async-noauth-ssl-replica-set + - name: test-standard-v5.0-python3.11-async-noauth-ssl-replica-set commands: - func: run server vars: AUTH: noauth SSL: ssl TOPOLOGY: replica_set - VERSION: "4.4" + VERSION: "5.0" - func: run tests vars: AUTH: noauth SSL: ssl TOPOLOGY: replica_set - VERSION: "4.4" + VERSION: "5.0" PYTHON_VERSION: "3.11" TEST_NAME: default_async tags: - test-standard - - server-4.4 + - server-5.0 - python-3.11 - replica_set-noauth-ssl - async - - name: test-standard-v4.4-python3.12-sync-auth-ssl-sharded-cluster + - name: test-standard-v5.0-python3.12-sync-auth-ssl-sharded-cluster commands: - func: run server vars: AUTH: auth SSL: ssl TOPOLOGY: sharded_cluster - VERSION: "4.4" + VERSION: "5.0" - func: run tests vars: AUTH: auth SSL: ssl TOPOLOGY: sharded_cluster - VERSION: "4.4" + VERSION: "5.0" PYTHON_VERSION: "3.12" TEST_NAME: default_sync tags: - test-standard - - server-4.4 + - server-5.0 - python-3.12 - sharded_cluster-auth-ssl - sync - - name: test-standard-v5.0-python3.13-async-noauth-nossl-standalone + - name: test-standard-v6.0-python3.13-async-noauth-nossl-standalone commands: - func: run server vars: AUTH: noauth SSL: nossl TOPOLOGY: standalone - VERSION: "5.0" + VERSION: "6.0" - func: run tests vars: AUTH: noauth SSL: nossl TOPOLOGY: standalone - VERSION: "5.0" + VERSION: "6.0" PYTHON_VERSION: "3.13" TEST_NAME: default_async tags: - test-standard - - server-5.0 + - server-6.0 - python-3.13 - standalone-noauth-nossl - async - - name: test-standard-v5.0-python3.9-sync-noauth-ssl-replica-set + - name: test-standard-v6.0-python3.9-sync-noauth-ssl-replica-set commands: - func: run server vars: AUTH: noauth SSL: ssl TOPOLOGY: replica_set - VERSION: "5.0" + VERSION: "6.0" - func: run tests vars: AUTH: noauth SSL: ssl TOPOLOGY: replica_set - VERSION: "5.0" + VERSION: "6.0" PYTHON_VERSION: "3.9" TEST_NAME: default_sync tags: - test-standard - - server-5.0 + - server-6.0 - python-3.9 - replica_set-noauth-ssl - sync - - name: test-standard-v5.0-python3.10-async-auth-ssl-sharded-cluster + - name: test-standard-v6.0-python3.10-async-auth-ssl-sharded-cluster commands: - func: run server vars: AUTH: auth SSL: ssl TOPOLOGY: sharded_cluster - VERSION: "5.0" + VERSION: "6.0" - func: run tests vars: AUTH: auth SSL: ssl TOPOLOGY: sharded_cluster - VERSION: "5.0" + VERSION: "6.0" PYTHON_VERSION: "3.10" TEST_NAME: default_async tags: - test-standard - - server-5.0 + - server-6.0 - python-3.10 - sharded_cluster-auth-ssl - async - - name: test-standard-v6.0-python3.11-sync-noauth-nossl-standalone + - name: test-standard-v7.0-python3.11-sync-noauth-nossl-standalone commands: - func: run server vars: AUTH: noauth SSL: nossl TOPOLOGY: standalone - VERSION: "6.0" + VERSION: "7.0" - func: run tests vars: AUTH: noauth SSL: nossl TOPOLOGY: standalone - VERSION: "6.0" + VERSION: "7.0" PYTHON_VERSION: "3.11" TEST_NAME: default_sync tags: - test-standard - - server-6.0 + - server-7.0 - python-3.11 - standalone-noauth-nossl - sync - - name: test-standard-v6.0-python3.12-async-noauth-ssl-replica-set + - name: test-standard-v7.0-python3.12-async-noauth-ssl-replica-set commands: - func: run server vars: AUTH: noauth SSL: ssl TOPOLOGY: replica_set - VERSION: "6.0" + VERSION: "7.0" - func: run tests vars: AUTH: noauth SSL: ssl TOPOLOGY: replica_set - VERSION: "6.0" + VERSION: "7.0" PYTHON_VERSION: "3.12" TEST_NAME: default_async tags: - test-standard - - server-6.0 + - server-7.0 - python-3.12 - replica_set-noauth-ssl - async - - name: test-standard-v6.0-python3.13-sync-auth-ssl-sharded-cluster + - name: test-standard-v7.0-python3.13-sync-auth-ssl-sharded-cluster commands: - func: run server vars: AUTH: auth SSL: ssl TOPOLOGY: sharded_cluster - VERSION: "6.0" + VERSION: "7.0" - func: run tests vars: AUTH: auth SSL: ssl TOPOLOGY: sharded_cluster - VERSION: "6.0" + VERSION: "7.0" PYTHON_VERSION: "3.13" TEST_NAME: default_sync tags: - test-standard - - server-6.0 + - server-7.0 - python-3.13 - sharded_cluster-auth-ssl - sync - - name: test-standard-v7.0-python3.9-async-noauth-nossl-standalone + - name: test-standard-v8.0-python3.9-async-noauth-nossl-standalone commands: - func: run server vars: AUTH: noauth SSL: nossl TOPOLOGY: standalone - VERSION: "7.0" + VERSION: "8.0" - func: run tests vars: AUTH: noauth SSL: nossl TOPOLOGY: standalone - VERSION: "7.0" + VERSION: "8.0" PYTHON_VERSION: "3.9" TEST_NAME: default_async tags: - test-standard - - server-7.0 + - server-8.0 - python-3.9 - standalone-noauth-nossl - async - - name: test-standard-v7.0-python3.10-sync-noauth-ssl-replica-set + - name: test-standard-v8.0-python3.10-sync-noauth-ssl-replica-set commands: - func: run server vars: AUTH: noauth SSL: ssl TOPOLOGY: replica_set - VERSION: "7.0" + VERSION: "8.0" - func: run tests vars: AUTH: noauth SSL: ssl TOPOLOGY: replica_set - VERSION: "7.0" + VERSION: "8.0" PYTHON_VERSION: "3.10" TEST_NAME: default_sync tags: - test-standard - - server-7.0 + - server-8.0 - python-3.10 - replica_set-noauth-ssl - sync - - name: test-standard-v7.0-python3.11-async-auth-ssl-sharded-cluster + - name: test-standard-v8.0-python3.11-async-auth-ssl-sharded-cluster commands: - func: run server vars: AUTH: auth SSL: ssl TOPOLOGY: sharded_cluster - VERSION: "7.0" + VERSION: "8.0" - func: run tests vars: AUTH: auth SSL: ssl TOPOLOGY: sharded_cluster - VERSION: "7.0" + VERSION: "8.0" PYTHON_VERSION: "3.11" TEST_NAME: default_async tags: - test-standard - - server-7.0 + - server-8.0 - python-3.11 - sharded_cluster-auth-ssl - async - - name: test-standard-v8.0-python3.12-sync-noauth-nossl-standalone + - name: test-standard-rapid-python3.12-sync-noauth-nossl-standalone commands: - func: run server vars: AUTH: noauth SSL: nossl TOPOLOGY: standalone - VERSION: "8.0" + VERSION: rapid - func: run tests vars: AUTH: noauth SSL: nossl TOPOLOGY: standalone - VERSION: "8.0" + VERSION: rapid PYTHON_VERSION: "3.12" TEST_NAME: default_sync tags: - test-standard - - server-8.0 + - server-rapid - python-3.12 - standalone-noauth-nossl - sync - - name: test-standard-v8.0-python3.13-async-noauth-ssl-replica-set + - name: test-standard-rapid-python3.13-async-noauth-ssl-replica-set commands: - func: run server vars: AUTH: noauth SSL: ssl TOPOLOGY: replica_set - VERSION: "8.0" + VERSION: rapid - func: run tests vars: AUTH: noauth SSL: ssl TOPOLOGY: replica_set - VERSION: "8.0" + VERSION: rapid PYTHON_VERSION: "3.13" TEST_NAME: default_async tags: - test-standard - - server-8.0 + - server-rapid - python-3.13 - replica_set-noauth-ssl - async - - name: test-standard-v8.0-python3.9-sync-auth-ssl-sharded-cluster + - name: test-standard-rapid-python3.9-sync-auth-ssl-sharded-cluster commands: - func: run server vars: AUTH: auth SSL: ssl TOPOLOGY: sharded_cluster - VERSION: "8.0" + VERSION: rapid - func: run tests vars: AUTH: auth SSL: ssl TOPOLOGY: sharded_cluster - VERSION: "8.0" + VERSION: rapid PYTHON_VERSION: "3.9" TEST_NAME: default_sync tags: - test-standard - - server-8.0 + - server-rapid - python-3.9 - sharded_cluster-auth-ssl - sync - - name: test-standard-rapid-python3.10-async-noauth-nossl-standalone + - name: test-standard-latest-python3.10-async-noauth-nossl-standalone commands: - func: run server vars: AUTH: noauth SSL: nossl TOPOLOGY: standalone - VERSION: rapid + VERSION: latest - func: run tests vars: AUTH: noauth SSL: nossl TOPOLOGY: standalone - VERSION: rapid + VERSION: latest PYTHON_VERSION: "3.10" TEST_NAME: default_async tags: - test-standard - - server-rapid + - server-latest - python-3.10 - standalone-noauth-nossl - async - - name: test-standard-rapid-python3.11-sync-noauth-ssl-replica-set - commands: - - func: run server - vars: - AUTH: noauth - SSL: ssl - TOPOLOGY: replica_set - VERSION: rapid - - func: run tests - vars: - AUTH: noauth - SSL: ssl - TOPOLOGY: replica_set - VERSION: rapid - PYTHON_VERSION: "3.11" - TEST_NAME: default_sync - tags: - - test-standard - - server-rapid - - python-3.11 - - replica_set-noauth-ssl - - sync - - name: test-standard-rapid-python3.12-async-auth-ssl-sharded-cluster - commands: - - func: run server - vars: - AUTH: auth - SSL: ssl - TOPOLOGY: sharded_cluster - VERSION: rapid - - func: run tests - vars: - AUTH: auth - SSL: ssl - TOPOLOGY: sharded_cluster - VERSION: rapid - PYTHON_VERSION: "3.12" - TEST_NAME: default_async - tags: - - test-standard - - server-rapid - - python-3.12 - - sharded_cluster-auth-ssl - - async - - name: test-standard-latest-python3.13-sync-noauth-nossl-standalone - commands: - - func: run server - vars: - AUTH: noauth - SSL: nossl - TOPOLOGY: standalone - VERSION: latest - - func: run tests - vars: - AUTH: noauth - SSL: nossl - TOPOLOGY: standalone - VERSION: latest - PYTHON_VERSION: "3.13" - TEST_NAME: default_sync - tags: - - test-standard - - server-latest - - python-3.13 - - standalone-noauth-nossl - - sync - pr - - name: test-standard-latest-python3.9-async-noauth-ssl-replica-set + - name: test-standard-latest-python3.11-sync-noauth-ssl-replica-set commands: - func: run server vars: @@ -3636,16 +3570,16 @@ tasks: SSL: ssl TOPOLOGY: replica_set VERSION: latest - PYTHON_VERSION: "3.9" - TEST_NAME: default_async + PYTHON_VERSION: "3.11" + TEST_NAME: default_sync tags: - test-standard - server-latest - - python-3.9 + - python-3.11 - replica_set-noauth-ssl - - async + - sync - pr - - name: test-standard-latest-python3.10-sync-auth-ssl-sharded-cluster + - name: test-standard-latest-python3.12-async-auth-ssl-sharded-cluster commands: - func: run server vars: @@ -3659,288 +3593,202 @@ tasks: SSL: ssl TOPOLOGY: sharded_cluster VERSION: latest - PYTHON_VERSION: "3.10" - TEST_NAME: default_sync + PYTHON_VERSION: "3.12" + TEST_NAME: default_async tags: - test-standard - server-latest - - python-3.10 + - python-3.12 - sharded_cluster-auth-ssl - - sync + - async - pr - - name: test-standard-v4.0-pypy3.10-sync-noauth-nossl-standalone + - name: test-standard-v4.2-pypy3.10-sync-noauth-nossl-standalone commands: - func: run server vars: AUTH: noauth SSL: nossl TOPOLOGY: standalone - VERSION: "4.0" + VERSION: "4.2" - func: run tests vars: AUTH: noauth SSL: nossl TOPOLOGY: standalone - VERSION: "4.0" + VERSION: "4.2" PYTHON_VERSION: pypy3.10 TEST_NAME: default_sync tags: - test-standard - - server-4.0 + - server-4.2 - python-pypy3.10 - standalone-noauth-nossl - sync - pypy - - name: test-standard-v4.2-pypy3.10-async-noauth-ssl-replica-set + - name: test-standard-v4.4-pypy3.10-async-noauth-ssl-replica-set commands: - func: run server vars: AUTH: noauth SSL: ssl TOPOLOGY: replica_set - VERSION: "4.2" + VERSION: "4.4" - func: run tests vars: AUTH: noauth SSL: ssl TOPOLOGY: replica_set - VERSION: "4.2" + VERSION: "4.4" PYTHON_VERSION: pypy3.10 TEST_NAME: default_async tags: - test-standard - - server-4.2 + - server-4.4 - python-pypy3.10 - replica_set-noauth-ssl - async - pypy - - name: test-standard-v4.4-pypy3.10-sync-auth-ssl-sharded-cluster + - name: test-standard-v5.0-pypy3.10-sync-auth-ssl-sharded-cluster commands: - func: run server vars: AUTH: auth SSL: ssl TOPOLOGY: sharded_cluster - VERSION: "4.4" + VERSION: "5.0" - func: run tests vars: AUTH: auth SSL: ssl TOPOLOGY: sharded_cluster - VERSION: "4.4" + VERSION: "5.0" PYTHON_VERSION: pypy3.10 TEST_NAME: default_sync tags: - test-standard - - server-4.4 + - server-5.0 - python-pypy3.10 - sharded_cluster-auth-ssl - sync - pypy - - name: test-standard-v5.0-pypy3.10-async-noauth-nossl-standalone + - name: test-standard-v6.0-pypy3.10-async-noauth-nossl-standalone commands: - func: run server vars: AUTH: noauth SSL: nossl TOPOLOGY: standalone - VERSION: "5.0" + VERSION: "6.0" - func: run tests vars: AUTH: noauth SSL: nossl TOPOLOGY: standalone - VERSION: "5.0" + VERSION: "6.0" PYTHON_VERSION: pypy3.10 TEST_NAME: default_async tags: - test-standard - - server-5.0 + - server-6.0 - python-pypy3.10 - standalone-noauth-nossl - async - pypy - - name: test-standard-v6.0-pypy3.10-sync-noauth-ssl-replica-set + - name: test-standard-v7.0-pypy3.10-sync-noauth-ssl-replica-set commands: - func: run server vars: AUTH: noauth SSL: ssl TOPOLOGY: replica_set - VERSION: "6.0" + VERSION: "7.0" - func: run tests vars: AUTH: noauth SSL: ssl TOPOLOGY: replica_set - VERSION: "6.0" + VERSION: "7.0" PYTHON_VERSION: pypy3.10 TEST_NAME: default_sync tags: - test-standard - - server-6.0 + - server-7.0 - python-pypy3.10 - replica_set-noauth-ssl - sync - pypy - - name: test-standard-v7.0-pypy3.10-async-auth-ssl-sharded-cluster + - name: test-standard-v8.0-pypy3.10-async-auth-ssl-sharded-cluster commands: - func: run server vars: AUTH: auth SSL: ssl TOPOLOGY: sharded_cluster - VERSION: "7.0" + VERSION: "8.0" - func: run tests vars: AUTH: auth SSL: ssl TOPOLOGY: sharded_cluster - VERSION: "7.0" + VERSION: "8.0" PYTHON_VERSION: pypy3.10 TEST_NAME: default_async tags: - test-standard - - server-7.0 + - server-8.0 - python-pypy3.10 - sharded_cluster-auth-ssl - async - pypy - - name: test-standard-v8.0-pypy3.10-sync-noauth-nossl-standalone + - name: test-standard-rapid-pypy3.10-sync-noauth-nossl-standalone commands: - func: run server vars: AUTH: noauth SSL: nossl TOPOLOGY: standalone - VERSION: "8.0" + VERSION: rapid - func: run tests vars: AUTH: noauth SSL: nossl TOPOLOGY: standalone - VERSION: "8.0" + VERSION: rapid PYTHON_VERSION: pypy3.10 TEST_NAME: default_sync tags: - test-standard - - server-8.0 + - server-rapid - python-pypy3.10 - standalone-noauth-nossl - sync - pypy - - name: test-standard-rapid-pypy3.10-async-noauth-ssl-replica-set + - name: test-standard-latest-pypy3.10-async-noauth-ssl-replica-set commands: - func: run server vars: AUTH: noauth SSL: ssl TOPOLOGY: replica_set - VERSION: rapid + VERSION: latest - func: run tests vars: AUTH: noauth SSL: ssl TOPOLOGY: replica_set - VERSION: rapid + VERSION: latest PYTHON_VERSION: pypy3.10 TEST_NAME: default_async tags: - test-standard - - server-rapid + - server-latest - python-pypy3.10 - replica_set-noauth-ssl - async - pypy - - name: test-standard-latest-pypy3.10-sync-auth-ssl-sharded-cluster - commands: - - func: run server - vars: - AUTH: auth - SSL: ssl - TOPOLOGY: sharded_cluster - VERSION: latest - - func: run tests - vars: - AUTH: auth - SSL: ssl - TOPOLOGY: sharded_cluster - VERSION: latest - PYTHON_VERSION: pypy3.10 - TEST_NAME: default_sync - tags: - - test-standard - - server-latest - - python-pypy3.10 - - sharded_cluster-auth-ssl - - sync - - pypy # Test non standard tests - - name: test-non-standard-v4.0-python3.9-noauth-nossl-standalone - commands: - - func: run server - vars: - AUTH: noauth - SSL: nossl - TOPOLOGY: standalone - VERSION: "4.0" - - func: run tests - vars: - AUTH: noauth - SSL: nossl - TOPOLOGY: standalone - VERSION: "4.0" - PYTHON_VERSION: "3.9" - tags: - - test-non-standard - - server-4.0 - - python-3.9 - - standalone-noauth-nossl - - noauth - - name: test-non-standard-v4.0-python3.10-noauth-ssl-replica-set - commands: - - func: run server - vars: - AUTH: noauth - SSL: ssl - TOPOLOGY: replica_set - VERSION: "4.0" - - func: run tests - vars: - AUTH: noauth - SSL: ssl - TOPOLOGY: replica_set - VERSION: "4.0" - PYTHON_VERSION: "3.10" - tags: - - test-non-standard - - server-4.0 - - python-3.10 - - replica_set-noauth-ssl - - noauth - - name: test-non-standard-v4.0-python3.11-auth-ssl-sharded-cluster - commands: - - func: run server - vars: - AUTH: auth - SSL: ssl - TOPOLOGY: sharded_cluster - VERSION: "4.0" - - func: run tests - vars: - AUTH: auth - SSL: ssl - TOPOLOGY: sharded_cluster - VERSION: "4.0" - PYTHON_VERSION: "3.11" - tags: - - test-non-standard - - server-4.0 - - python-3.11 - - sharded_cluster-auth-ssl - - auth - - name: test-non-standard-v4.2-python3.12-noauth-nossl-standalone + - name: test-non-standard-v4.2-python3.9-noauth-nossl-standalone commands: - func: run server vars: @@ -3954,14 +3802,14 @@ tasks: SSL: nossl TOPOLOGY: standalone VERSION: "4.2" - PYTHON_VERSION: "3.12" + PYTHON_VERSION: "3.9" tags: - test-non-standard - server-4.2 - - python-3.12 + - python-3.9 - standalone-noauth-nossl - noauth - - name: test-non-standard-v4.2-python3.13-noauth-ssl-replica-set + - name: test-non-standard-v4.2-python3.10-noauth-ssl-replica-set commands: - func: run server vars: @@ -3975,14 +3823,14 @@ tasks: SSL: ssl TOPOLOGY: replica_set VERSION: "4.2" - PYTHON_VERSION: "3.13" + PYTHON_VERSION: "3.10" tags: - test-non-standard - server-4.2 - - python-3.13 + - python-3.10 - replica_set-noauth-ssl - noauth - - name: test-non-standard-v4.2-python3.9-auth-ssl-sharded-cluster + - name: test-non-standard-v4.2-python3.11-auth-ssl-sharded-cluster commands: - func: run server vars: @@ -3996,14 +3844,14 @@ tasks: SSL: ssl TOPOLOGY: sharded_cluster VERSION: "4.2" - PYTHON_VERSION: "3.9" + PYTHON_VERSION: "3.11" tags: - test-non-standard - server-4.2 - - python-3.9 + - python-3.11 - sharded_cluster-auth-ssl - auth - - name: test-non-standard-v4.4-python3.10-noauth-nossl-standalone + - name: test-non-standard-v4.4-python3.12-noauth-nossl-standalone commands: - func: run server vars: @@ -4017,14 +3865,14 @@ tasks: SSL: nossl TOPOLOGY: standalone VERSION: "4.4" - PYTHON_VERSION: "3.10" + PYTHON_VERSION: "3.12" tags: - test-non-standard - server-4.4 - - python-3.10 + - python-3.12 - standalone-noauth-nossl - noauth - - name: test-non-standard-v4.4-python3.11-noauth-ssl-replica-set + - name: test-non-standard-v4.4-python3.13-noauth-ssl-replica-set commands: - func: run server vars: @@ -4038,14 +3886,14 @@ tasks: SSL: ssl TOPOLOGY: replica_set VERSION: "4.4" - PYTHON_VERSION: "3.11" + PYTHON_VERSION: "3.13" tags: - test-non-standard - server-4.4 - - python-3.11 + - python-3.13 - replica_set-noauth-ssl - noauth - - name: test-non-standard-v4.4-python3.12-auth-ssl-sharded-cluster + - name: test-non-standard-v4.4-python3.9-auth-ssl-sharded-cluster commands: - func: run server vars: @@ -4059,14 +3907,14 @@ tasks: SSL: ssl TOPOLOGY: sharded_cluster VERSION: "4.4" - PYTHON_VERSION: "3.12" + PYTHON_VERSION: "3.9" tags: - test-non-standard - server-4.4 - - python-3.12 + - python-3.9 - sharded_cluster-auth-ssl - auth - - name: test-non-standard-v5.0-python3.13-noauth-nossl-standalone + - name: test-non-standard-v5.0-python3.10-noauth-nossl-standalone commands: - func: run server vars: @@ -4080,14 +3928,14 @@ tasks: SSL: nossl TOPOLOGY: standalone VERSION: "5.0" - PYTHON_VERSION: "3.13" + PYTHON_VERSION: "3.10" tags: - test-non-standard - server-5.0 - - python-3.13 + - python-3.10 - standalone-noauth-nossl - noauth - - name: test-non-standard-v5.0-python3.9-noauth-ssl-replica-set + - name: test-non-standard-v5.0-python3.11-noauth-ssl-replica-set commands: - func: run server vars: @@ -4101,14 +3949,14 @@ tasks: SSL: ssl TOPOLOGY: replica_set VERSION: "5.0" - PYTHON_VERSION: "3.9" + PYTHON_VERSION: "3.11" tags: - test-non-standard - server-5.0 - - python-3.9 + - python-3.11 - replica_set-noauth-ssl - noauth - - name: test-non-standard-v5.0-python3.10-auth-ssl-sharded-cluster + - name: test-non-standard-v5.0-python3.12-auth-ssl-sharded-cluster commands: - func: run server vars: @@ -4122,14 +3970,14 @@ tasks: SSL: ssl TOPOLOGY: sharded_cluster VERSION: "5.0" - PYTHON_VERSION: "3.10" + PYTHON_VERSION: "3.12" tags: - test-non-standard - server-5.0 - - python-3.10 + - python-3.12 - sharded_cluster-auth-ssl - auth - - name: test-non-standard-v6.0-python3.11-noauth-nossl-standalone + - name: test-non-standard-v6.0-python3.13-noauth-nossl-standalone commands: - func: run server vars: @@ -4143,14 +3991,14 @@ tasks: SSL: nossl TOPOLOGY: standalone VERSION: "6.0" - PYTHON_VERSION: "3.11" + PYTHON_VERSION: "3.13" tags: - test-non-standard - server-6.0 - - python-3.11 + - python-3.13 - standalone-noauth-nossl - noauth - - name: test-non-standard-v6.0-python3.12-noauth-ssl-replica-set + - name: test-non-standard-v6.0-python3.9-noauth-ssl-replica-set commands: - func: run server vars: @@ -4164,14 +4012,14 @@ tasks: SSL: ssl TOPOLOGY: replica_set VERSION: "6.0" - PYTHON_VERSION: "3.12" + PYTHON_VERSION: "3.9" tags: - test-non-standard - server-6.0 - - python-3.12 + - python-3.9 - replica_set-noauth-ssl - noauth - - name: test-non-standard-v6.0-python3.13-auth-ssl-sharded-cluster + - name: test-non-standard-v6.0-python3.10-auth-ssl-sharded-cluster commands: - func: run server vars: @@ -4185,14 +4033,14 @@ tasks: SSL: ssl TOPOLOGY: sharded_cluster VERSION: "6.0" - PYTHON_VERSION: "3.13" + PYTHON_VERSION: "3.10" tags: - test-non-standard - server-6.0 - - python-3.13 + - python-3.10 - sharded_cluster-auth-ssl - auth - - name: test-non-standard-v7.0-python3.9-noauth-nossl-standalone + - name: test-non-standard-v7.0-python3.11-noauth-nossl-standalone commands: - func: run server vars: @@ -4206,14 +4054,14 @@ tasks: SSL: nossl TOPOLOGY: standalone VERSION: "7.0" - PYTHON_VERSION: "3.9" + PYTHON_VERSION: "3.11" tags: - test-non-standard - server-7.0 - - python-3.9 + - python-3.11 - standalone-noauth-nossl - noauth - - name: test-non-standard-v7.0-python3.10-noauth-ssl-replica-set + - name: test-non-standard-v7.0-python3.12-noauth-ssl-replica-set commands: - func: run server vars: @@ -4227,14 +4075,14 @@ tasks: SSL: ssl TOPOLOGY: replica_set VERSION: "7.0" - PYTHON_VERSION: "3.10" + PYTHON_VERSION: "3.12" tags: - test-non-standard - server-7.0 - - python-3.10 + - python-3.12 - replica_set-noauth-ssl - noauth - - name: test-non-standard-v7.0-python3.11-auth-ssl-sharded-cluster + - name: test-non-standard-v7.0-python3.13-auth-ssl-sharded-cluster commands: - func: run server vars: @@ -4248,14 +4096,14 @@ tasks: SSL: ssl TOPOLOGY: sharded_cluster VERSION: "7.0" - PYTHON_VERSION: "3.11" + PYTHON_VERSION: "3.13" tags: - test-non-standard - server-7.0 - - python-3.11 + - python-3.13 - sharded_cluster-auth-ssl - auth - - name: test-non-standard-v8.0-python3.12-noauth-nossl-standalone + - name: test-non-standard-v8.0-python3.9-noauth-nossl-standalone commands: - func: run server vars: @@ -4269,14 +4117,14 @@ tasks: SSL: nossl TOPOLOGY: standalone VERSION: "8.0" - PYTHON_VERSION: "3.12" + PYTHON_VERSION: "3.9" tags: - test-non-standard - server-8.0 - - python-3.12 + - python-3.9 - standalone-noauth-nossl - noauth - - name: test-non-standard-v8.0-python3.13-noauth-ssl-replica-set + - name: test-non-standard-v8.0-python3.10-noauth-ssl-replica-set commands: - func: run server vars: @@ -4290,14 +4138,14 @@ tasks: SSL: ssl TOPOLOGY: replica_set VERSION: "8.0" - PYTHON_VERSION: "3.13" + PYTHON_VERSION: "3.10" tags: - test-non-standard - server-8.0 - - python-3.13 + - python-3.10 - replica_set-noauth-ssl - noauth - - name: test-non-standard-v8.0-python3.9-auth-ssl-sharded-cluster + - name: test-non-standard-v8.0-python3.11-auth-ssl-sharded-cluster commands: - func: run server vars: @@ -4311,14 +4159,14 @@ tasks: SSL: ssl TOPOLOGY: sharded_cluster VERSION: "8.0" - PYTHON_VERSION: "3.9" + PYTHON_VERSION: "3.11" tags: - test-non-standard - server-8.0 - - python-3.9 + - python-3.11 - sharded_cluster-auth-ssl - auth - - name: test-non-standard-rapid-python3.10-noauth-nossl-standalone + - name: test-non-standard-rapid-python3.12-noauth-nossl-standalone commands: - func: run server vars: @@ -4332,14 +4180,14 @@ tasks: SSL: nossl TOPOLOGY: standalone VERSION: rapid - PYTHON_VERSION: "3.10" + PYTHON_VERSION: "3.12" tags: - test-non-standard - server-rapid - - python-3.10 + - python-3.12 - standalone-noauth-nossl - noauth - - name: test-non-standard-rapid-python3.11-noauth-ssl-replica-set + - name: test-non-standard-rapid-python3.13-noauth-ssl-replica-set commands: - func: run server vars: @@ -4353,14 +4201,14 @@ tasks: SSL: ssl TOPOLOGY: replica_set VERSION: rapid - PYTHON_VERSION: "3.11" + PYTHON_VERSION: "3.13" tags: - test-non-standard - server-rapid - - python-3.11 + - python-3.13 - replica_set-noauth-ssl - noauth - - name: test-non-standard-rapid-python3.12-auth-ssl-sharded-cluster + - name: test-non-standard-rapid-python3.9-auth-ssl-sharded-cluster commands: - func: run server vars: @@ -4374,14 +4222,14 @@ tasks: SSL: ssl TOPOLOGY: sharded_cluster VERSION: rapid - PYTHON_VERSION: "3.12" + PYTHON_VERSION: "3.9" tags: - test-non-standard - server-rapid - - python-3.12 + - python-3.9 - sharded_cluster-auth-ssl - auth - - name: test-non-standard-latest-python3.13-noauth-nossl-standalone + - name: test-non-standard-latest-python3.10-noauth-nossl-standalone commands: - func: run server vars: @@ -4395,15 +4243,15 @@ tasks: SSL: nossl TOPOLOGY: standalone VERSION: latest - PYTHON_VERSION: "3.13" + PYTHON_VERSION: "3.10" tags: - test-non-standard - server-latest - - python-3.13 + - python-3.10 - standalone-noauth-nossl - noauth - pr - - name: test-non-standard-latest-python3.9-noauth-ssl-replica-set + - name: test-non-standard-latest-python3.11-noauth-ssl-replica-set commands: - func: run server vars: @@ -4417,15 +4265,15 @@ tasks: SSL: ssl TOPOLOGY: replica_set VERSION: latest - PYTHON_VERSION: "3.9" + PYTHON_VERSION: "3.11" tags: - test-non-standard - server-latest - - python-3.9 + - python-3.11 - replica_set-noauth-ssl - noauth - pr - - name: test-non-standard-latest-python3.10-auth-ssl-sharded-cluster + - name: test-non-standard-latest-python3.12-auth-ssl-sharded-cluster commands: - func: run server vars: @@ -4439,209 +4287,187 @@ tasks: SSL: ssl TOPOLOGY: sharded_cluster VERSION: latest - PYTHON_VERSION: "3.10" + PYTHON_VERSION: "3.12" tags: - test-non-standard - server-latest - - python-3.10 + - python-3.12 - sharded_cluster-auth-ssl - auth - pr - - name: test-non-standard-v4.0-pypy3.10-noauth-nossl-standalone + - name: test-non-standard-v4.2-pypy3.10-noauth-nossl-standalone commands: - func: run server vars: AUTH: noauth SSL: nossl TOPOLOGY: standalone - VERSION: "4.0" + VERSION: "4.2" - func: run tests vars: AUTH: noauth SSL: nossl TOPOLOGY: standalone - VERSION: "4.0" + VERSION: "4.2" PYTHON_VERSION: pypy3.10 tags: - test-non-standard - - server-4.0 + - server-4.2 - python-pypy3.10 - standalone-noauth-nossl - noauth - pypy - - name: test-non-standard-v4.2-pypy3.10-noauth-ssl-replica-set + - name: test-non-standard-v4.4-pypy3.10-noauth-ssl-replica-set commands: - func: run server vars: AUTH: noauth SSL: ssl TOPOLOGY: replica_set - VERSION: "4.2" + VERSION: "4.4" - func: run tests vars: AUTH: noauth SSL: ssl TOPOLOGY: replica_set - VERSION: "4.2" + VERSION: "4.4" PYTHON_VERSION: pypy3.10 tags: - test-non-standard - - server-4.2 + - server-4.4 - python-pypy3.10 - replica_set-noauth-ssl - noauth - pypy - - name: test-non-standard-v4.4-pypy3.10-auth-ssl-sharded-cluster + - name: test-non-standard-v5.0-pypy3.10-auth-ssl-sharded-cluster commands: - func: run server vars: AUTH: auth SSL: ssl TOPOLOGY: sharded_cluster - VERSION: "4.4" + VERSION: "5.0" - func: run tests vars: AUTH: auth SSL: ssl TOPOLOGY: sharded_cluster - VERSION: "4.4" + VERSION: "5.0" PYTHON_VERSION: pypy3.10 tags: - test-non-standard - - server-4.4 + - server-5.0 - python-pypy3.10 - sharded_cluster-auth-ssl - auth - pypy - - name: test-non-standard-v5.0-pypy3.10-noauth-nossl-standalone + - name: test-non-standard-v6.0-pypy3.10-noauth-nossl-standalone commands: - func: run server vars: AUTH: noauth SSL: nossl TOPOLOGY: standalone - VERSION: "5.0" + VERSION: "6.0" - func: run tests vars: AUTH: noauth SSL: nossl TOPOLOGY: standalone - VERSION: "5.0" + VERSION: "6.0" PYTHON_VERSION: pypy3.10 tags: - test-non-standard - - server-5.0 + - server-6.0 - python-pypy3.10 - standalone-noauth-nossl - noauth - pypy - - name: test-non-standard-v6.0-pypy3.10-noauth-ssl-replica-set + - name: test-non-standard-v7.0-pypy3.10-noauth-ssl-replica-set commands: - func: run server vars: AUTH: noauth SSL: ssl TOPOLOGY: replica_set - VERSION: "6.0" + VERSION: "7.0" - func: run tests vars: AUTH: noauth SSL: ssl TOPOLOGY: replica_set - VERSION: "6.0" + VERSION: "7.0" PYTHON_VERSION: pypy3.10 tags: - test-non-standard - - server-6.0 + - server-7.0 - python-pypy3.10 - replica_set-noauth-ssl - noauth - pypy - - name: test-non-standard-v7.0-pypy3.10-auth-ssl-sharded-cluster + - name: test-non-standard-v8.0-pypy3.10-auth-ssl-sharded-cluster commands: - func: run server vars: AUTH: auth SSL: ssl TOPOLOGY: sharded_cluster - VERSION: "7.0" + VERSION: "8.0" - func: run tests vars: AUTH: auth SSL: ssl TOPOLOGY: sharded_cluster - VERSION: "7.0" + VERSION: "8.0" PYTHON_VERSION: pypy3.10 tags: - test-non-standard - - server-7.0 + - server-8.0 - python-pypy3.10 - sharded_cluster-auth-ssl - auth - pypy - - name: test-non-standard-v8.0-pypy3.10-noauth-nossl-standalone + - name: test-non-standard-rapid-pypy3.10-noauth-nossl-standalone commands: - func: run server vars: AUTH: noauth SSL: nossl TOPOLOGY: standalone - VERSION: "8.0" + VERSION: rapid - func: run tests vars: AUTH: noauth SSL: nossl TOPOLOGY: standalone - VERSION: "8.0" + VERSION: rapid PYTHON_VERSION: pypy3.10 tags: - test-non-standard - - server-8.0 + - server-rapid - python-pypy3.10 - standalone-noauth-nossl - noauth - pypy - - name: test-non-standard-rapid-pypy3.10-noauth-ssl-replica-set + - name: test-non-standard-latest-pypy3.10-noauth-ssl-replica-set commands: - func: run server vars: AUTH: noauth SSL: ssl TOPOLOGY: replica_set - VERSION: rapid + VERSION: latest - func: run tests vars: AUTH: noauth SSL: ssl TOPOLOGY: replica_set - VERSION: rapid - PYTHON_VERSION: pypy3.10 - tags: - - test-non-standard - - server-rapid - - python-pypy3.10 - - replica_set-noauth-ssl - - noauth - - pypy - - name: test-non-standard-latest-pypy3.10-auth-ssl-sharded-cluster - commands: - - func: run server - vars: - AUTH: auth - SSL: ssl - TOPOLOGY: sharded_cluster - VERSION: latest - - func: run tests - vars: - AUTH: auth - SSL: ssl - TOPOLOGY: sharded_cluster VERSION: latest PYTHON_VERSION: pypy3.10 tags: - test-non-standard - server-latest - python-pypy3.10 - - sharded_cluster-auth-ssl - - auth + - replica_set-noauth-ssl + - noauth - pypy diff --git a/.evergreen/generated_configs/variants.yml b/.evergreen/generated_configs/variants.yml index 673bb111cd..a9ad879fa1 100644 --- a/.evergreen/generated_configs/variants.yml +++ b/.evergreen/generated_configs/variants.yml @@ -146,7 +146,7 @@ buildvariants: COMPRESSOR: zlib - name: compression-zstd-rhel8 tasks: - - name: .test-standard !.server-4.0 + - name: .test-standard !.server-4.2 display_name: Compression zstd RHEL8 run_on: - rhel87-small @@ -522,13 +522,6 @@ buildvariants: PYTHON_BINARY: /opt/python/3.9/bin/python3 # Server version tests - - name: mongodb-v4.0 - tasks: - - name: .server-version - display_name: "* MongoDB v4.0" - run_on: - - rhel87-small - tags: [coverage_tag] - name: mongodb-v4.2 tasks: - name: .server-version @@ -684,11 +677,3 @@ buildvariants: - rhel87-small expansions: STORAGE_ENGINE: inmemory - - name: storage-mmapv1-rhel8 - tasks: - - name: .test-standard !.sharded_cluster-auth-ssl .server-4.0 - display_name: Storage MMAPv1 RHEL8 - run_on: - - rhel87-small - expansions: - STORAGE_ENGINE: mmapv1 diff --git a/.evergreen/scripts/generate_config.py b/.evergreen/scripts/generate_config.py index 9f42fb0a4b..a17354571e 100644 --- a/.evergreen/scripts/generate_config.py +++ b/.evergreen/scripts/generate_config.py @@ -25,7 +25,6 @@ get_task_name, get_variant_name, get_versions_from, - get_versions_until, handle_c_ext, write_functions_to_file, write_tasks_to_file, @@ -196,7 +195,7 @@ def create_compression_variants(): for compressor in "snappy", "zlib", "zstd": expansions = dict(COMPRESSOR=compressor) if compressor == "zstd": - tasks = [".test-standard !.server-4.0"] + tasks = [".test-standard !.server-4.2"] else: tasks = [".test-standard"] display_name = get_variant_name(f"Compression {compressor}", host) @@ -249,16 +248,11 @@ def create_pyopenssl_variants(): def create_storage_engine_variants(): host = DEFAULT_HOST - engines = ["InMemory", "MMAPv1"] + engines = ["InMemory"] variants = [] for engine in engines: expansions = dict(STORAGE_ENGINE=engine.lower()) - if engine == engines[0]: - tasks = [".test-standard .standalone-noauth-nossl"] - else: - # MongoDB 4.2 drops support for MMAPv1 - versions = get_versions_until("4.0") - tasks = [f".test-standard !.sharded_cluster-auth-ssl .server-{v}" for v in versions] + tasks = [".test-standard .standalone-noauth-nossl"] display_name = get_variant_name(f"Storage {engine}", host) variant = create_variant(tasks, display_name, host=host, expansions=expansions) variants.append(variant) diff --git a/.evergreen/scripts/generate_config_utils.py b/.evergreen/scripts/generate_config_utils.py index ad092983fa..62ea982cd8 100644 --- a/.evergreen/scripts/generate_config_utils.py +++ b/.evergreen/scripts/generate_config_utils.py @@ -21,7 +21,7 @@ # Globals ############## -ALL_VERSIONS = ["4.0", "4.2", "4.4", "5.0", "6.0", "7.0", "8.0", "rapid", "latest"] +ALL_VERSIONS = ["4.2", "4.4", "5.0", "6.0", "7.0", "8.0", "rapid", "latest"] CPYTHONS = ["3.9", "3.10", "3.11", "3.12", "3.13"] PYPYS = ["pypy3.10"] ALL_PYTHONS = CPYTHONS + PYPYS diff --git a/pymongo/common.py b/pymongo/common.py index 3d8095eedf..96f9f87459 100644 --- a/pymongo/common.py +++ b/pymongo/common.py @@ -66,8 +66,8 @@ MAX_WRITE_BATCH_SIZE = 100000 # What this version of PyMongo supports. -MIN_SUPPORTED_SERVER_VERSION = "4.0" -MIN_SUPPORTED_WIRE_VERSION = 7 +MIN_SUPPORTED_SERVER_VERSION = "4.2" +MIN_SUPPORTED_WIRE_VERSION = 8 # MongoDB 8.0 MAX_SUPPORTED_WIRE_VERSION = 25 diff --git a/test/__init__.py b/test/__init__.py index 39b4045e66..90e67cc999 100644 --- a/test/__init__.py +++ b/test/__init__.py @@ -263,9 +263,6 @@ def _init_client(self): self.server_status = {} else: self.server_status = self.client.admin.command("serverStatus") - if self.storage_engine == "mmapv1": - # MMAPv1 does not support retryWrites=True. - self.default_client_options["retryWrites"] = False hello = self.hello self.sessions_enabled = "logicalSessionTimeoutMinutes" in hello @@ -525,19 +522,6 @@ def require_data_lake(self, func): func=func, ) - def require_no_mmap(self, func): - """Run a test only if the server is not using the MMAPv1 storage - engine. Only works for standalone and replica sets; tests are - run regardless of storage engine on sharded clusters. - """ - - def is_not_mmap(): - if self.is_mongos: - return True - return self.storage_engine != "mmapv1" - - return self._require(is_not_mmap, "Storage engine must not be MMAPv1", func=func) - def require_version_min(self, *ver): """Run a test only if the server version is at least ``version``.""" other_version = Version(*ver) @@ -674,7 +658,7 @@ def require_no_serverless(self, func): def require_change_streams(self, func): """Run a test only if the server supports change streams.""" - return self.require_no_mmap(self.require_no_standalone(self.require_no_serverless(func))) + return self.require_no_standalone(self.require_no_serverless(func)) def is_topology_type(self, topologies): unknown = set(topologies) - { @@ -777,8 +761,6 @@ def require_sessions(self, func): return self._require(lambda: self.sessions_enabled, "Sessions not supported", func=func) def supports_retryable_writes(self): - if self.storage_engine == "mmapv1": - return False if not self.sessions_enabled: return False return self.is_mongos or self.is_rs @@ -792,9 +774,6 @@ def require_retryable_writes(self, func): ) def supports_transactions(self): - if self.storage_engine == "mmapv1": - return False - if self.version.at_least(4, 1, 8): return self.is_mongos or self.is_rs diff --git a/test/asynchronous/__init__.py b/test/asynchronous/__init__.py index 882cb6110f..c6079f2490 100644 --- a/test/asynchronous/__init__.py +++ b/test/asynchronous/__init__.py @@ -263,9 +263,6 @@ async def _init_client(self): self.server_status = {} else: self.server_status = await self.client.admin.command("serverStatus") - if self.storage_engine == "mmapv1": - # MMAPv1 does not support retryWrites=True. - self.default_client_options["retryWrites"] = False hello = await self.hello self.sessions_enabled = "logicalSessionTimeoutMinutes" in hello @@ -527,19 +524,6 @@ def require_data_lake(self, func): func=func, ) - def require_no_mmap(self, func): - """Run a test only if the server is not using the MMAPv1 storage - engine. Only works for standalone and replica sets; tests are - run regardless of storage engine on sharded clusters. - """ - - def is_not_mmap(): - if self.is_mongos: - return True - return self.storage_engine != "mmapv1" - - return self._require(is_not_mmap, "Storage engine must not be MMAPv1", func=func) - def require_version_min(self, *ver): """Run a test only if the server version is at least ``version``.""" other_version = Version(*ver) @@ -676,7 +660,7 @@ def require_no_serverless(self, func): def require_change_streams(self, func): """Run a test only if the server supports change streams.""" - return self.require_no_mmap(self.require_no_standalone(self.require_no_serverless(func))) + return self.require_no_standalone(self.require_no_serverless(func)) async def is_topology_type(self, topologies): unknown = set(topologies) - { @@ -779,8 +763,6 @@ def require_sessions(self, func): return self._require(lambda: self.sessions_enabled, "Sessions not supported", func=func) def supports_retryable_writes(self): - if self.storage_engine == "mmapv1": - return False if not self.sessions_enabled: return False return self.is_mongos or self.is_rs @@ -794,9 +776,6 @@ def require_retryable_writes(self, func): ) def supports_transactions(self): - if self.storage_engine == "mmapv1": - return False - if self.version.at_least(4, 1, 8): return self.is_mongos or self.is_rs diff --git a/test/asynchronous/test_bulk.py b/test/asynchronous/test_bulk.py index 62022de24c..b6dedb497c 100644 --- a/test/asynchronous/test_bulk.py +++ b/test/asynchronous/test_bulk.py @@ -165,7 +165,7 @@ async def _test_update_many(self, update): async def test_update_many(self): await self._test_update_many({"$set": {"foo": "bar"}}) - @async_client_context.require_version_min(4, 1, 11) + @async_client_context.require_version_min(4, 2, 0) async def test_update_many_pipeline(self): await self._test_update_many([{"$set": {"foo": "bar"}}]) @@ -206,7 +206,7 @@ async def _test_update_one(self, update): async def test_update_one(self): await self._test_update_one({"$set": {"foo": "bar"}}) - @async_client_context.require_version_min(4, 1, 11) + @async_client_context.require_version_min(4, 2, 0) async def test_update_one_pipeline(self): await self._test_update_one([{"$set": {"foo": "bar"}}]) diff --git a/test/asynchronous/test_change_stream.py b/test/asynchronous/test_change_stream.py index 0260cb7a82..1be45bee3e 100644 --- a/test/asynchronous/test_change_stream.py +++ b/test/asynchronous/test_change_stream.py @@ -267,7 +267,7 @@ async def test_batch_size_is_honored(self): # $changeStream.startAtOperationTime was added in 4.0.0. @no_type_check - @async_client_context.require_version_min(4, 0, 0) + @async_client_context.require_version_min(4, 2, 0) async def test_start_at_operation_time(self): optime = await self.get_start_at_operation_time() @@ -436,7 +436,7 @@ async def test_change_operations(self): await self._test_get_invalidate_event(change_stream) @no_type_check - @async_client_context.require_version_min(4, 1, 1) + @async_client_context.require_version_min(4, 2, 0) async def test_start_after(self): resume_token = await self.get_resume_token(invalidate=True) @@ -452,7 +452,7 @@ async def test_start_after(self): self.assertEqual(change["fullDocument"], {"_id": 2}) @no_type_check - @async_client_context.require_version_min(4, 1, 1) + @async_client_context.require_version_min(4, 2, 0) async def test_start_after_resume_process_with_changes(self): resume_token = await self.get_resume_token(invalidate=True) @@ -563,27 +563,16 @@ async def _test_update_resume_token(self, expected_rt_getter): ) # Prose test no. 1 - @async_client_context.require_version_min(4, 0, 7) + @async_client_context.require_version_min(4, 2, 0) async def test_update_resume_token(self): await self._test_update_resume_token(self._get_expected_resume_token) - # Prose test no. 1 - @async_client_context.require_version_max(4, 0, 7) - async def test_update_resume_token_legacy(self): - await self._test_update_resume_token(self._get_expected_resume_token_legacy) - # Prose test no. 2 - @async_client_context.require_version_min(4, 1, 8) + @async_client_context.require_version_min(4, 2, 0) async def test_raises_error_on_missing_id_418plus(self): # Server returns an error on 4.1.8+ await self._test_raises_error_on_missing_id(OperationFailure) - # Prose test no. 2 - @async_client_context.require_version_max(4, 1, 8) - async def test_raises_error_on_missing_id_418minus(self): - # PyMongo raises an error - await self._test_raises_error_on_missing_id(InvalidOperation) - # Prose test no. 3 @no_type_check async def test_resume_on_error(self): @@ -642,40 +631,12 @@ def raise_error(): cursor.close = raise_error await self.insert_one_and_check(change_stream, {"_id": 2}) - # Prose test no. 9 - @no_type_check - @async_client_context.require_version_min(4, 0, 0) - @async_client_context.require_version_max(4, 0, 7) - async def test_start_at_operation_time_caching(self): - # Case 1: change stream not started with startAtOperationTime - client, listener = self.client_with_listener("aggregate") - async with await self.change_stream_with_client(client) as cs: - await self.kill_change_stream_cursor(cs) - await cs.try_next() - cmd = listener.started_events[-1].command - self.assertIsNotNone(cmd["pipeline"][0]["$changeStream"].get("startAtOperationTime")) - - # Case 2: change stream started with startAtOperationTime - listener.reset() - optime = await self.get_start_at_operation_time() - async with await self.change_stream_with_client( - client, start_at_operation_time=optime - ) as cs: - await self.kill_change_stream_cursor(cs) - await cs.try_next() - cmd = listener.started_events[-1].command - self.assertEqual( - cmd["pipeline"][0]["$changeStream"].get("startAtOperationTime"), - optime, - str([k.command for k in listener.started_events]), - ) - # Prose test no. 10 - SKIPPED # This test is identical to prose test no. 3. # Prose test no. 11 @no_type_check - @async_client_context.require_version_min(4, 0, 7) + @async_client_context.require_version_min(4, 2, 0) async def test_resumetoken_empty_batch(self): client, listener = await self._client_with_listener("getMore") async with await self.change_stream_with_client(client) as change_stream: @@ -687,7 +648,7 @@ async def test_resumetoken_empty_batch(self): # Prose test no. 11 @no_type_check - @async_client_context.require_version_min(4, 0, 7) + @async_client_context.require_version_min(4, 2, 0) async def test_resumetoken_exhausted_batch(self): client, listener = await self._client_with_listener("getMore") async with await self.change_stream_with_client(client) as change_stream: @@ -697,38 +658,6 @@ async def test_resumetoken_exhausted_batch(self): response = listener.succeeded_events[-1].reply self.assertEqual(resume_token, response["cursor"]["postBatchResumeToken"]) - # Prose test no. 12 - @no_type_check - @async_client_context.require_version_max(4, 0, 7) - async def test_resumetoken_empty_batch_legacy(self): - resume_point = await self.get_resume_token() - - # Empty resume token when neither resumeAfter or startAfter specified. - async with await self.change_stream() as change_stream: - await change_stream.try_next() - self.assertIsNone(change_stream.resume_token) - - # Resume token value is same as resumeAfter. - async with await self.change_stream(resume_after=resume_point) as change_stream: - await change_stream.try_next() - resume_token = change_stream.resume_token - self.assertEqual(resume_token, resume_point) - - # Prose test no. 12 - @no_type_check - @async_client_context.require_version_max(4, 0, 7) - async def test_resumetoken_exhausted_batch_legacy(self): - # Resume token is _id of last change. - async with await self.change_stream() as change_stream: - change = await self._populate_and_exhaust_change_stream(change_stream) - self.assertEqual(change_stream.resume_token, change["_id"]) - resume_point = change["_id"] - - # Resume token is _id of last change even if resumeAfter is specified. - async with await self.change_stream(resume_after=resume_point) as change_stream: - change = await self._populate_and_exhaust_change_stream(change_stream) - self.assertEqual(change_stream.resume_token, change["_id"]) - # Prose test no. 13 @no_type_check async def test_resumetoken_partially_iterated_batch(self): @@ -770,13 +699,13 @@ async def test_resumetoken_uniterated_nonempty_batch_resumeafter(self): # Prose test no. 14 @no_type_check @async_client_context.require_no_mongos - @async_client_context.require_version_min(4, 1, 1) + @async_client_context.require_version_min(4, 2, 0) async def test_resumetoken_uniterated_nonempty_batch_startafter(self): await self._test_resumetoken_uniterated_nonempty_batch("start_after") # Prose test no. 17 @no_type_check - @async_client_context.require_version_min(4, 1, 1) + @async_client_context.require_version_min(4, 2, 0) async def test_startafter_resume_uses_startafter_after_empty_getMore(self): # Resume should use startAfter after no changes have been returned. resume_point = await self.get_resume_token() @@ -796,7 +725,7 @@ async def test_startafter_resume_uses_startafter_after_empty_getMore(self): # Prose test no. 18 @no_type_check - @async_client_context.require_version_min(4, 1, 1) + @async_client_context.require_version_min(4, 2, 0) async def test_startafter_resume_uses_resumeafter_after_nonempty_getMore(self): # Resume should use resumeAfter after some changes have been returned. resume_point = await self.get_resume_token() @@ -843,7 +772,7 @@ async def test_split_large_change(self): class TestClusterAsyncChangeStream(TestAsyncChangeStreamBase, APITestsMixin): dbs: list - @async_client_context.require_version_min(4, 0, 0, -1) + @async_client_context.require_version_min(4, 2, 0) @async_client_context.require_change_streams async def asyncSetUp(self) -> None: await super().asyncSetUp() @@ -903,7 +832,7 @@ async def test_full_pipeline(self): class TestAsyncDatabaseAsyncChangeStream(TestAsyncChangeStreamBase, APITestsMixin): - @async_client_context.require_version_min(4, 0, 0, -1) + @async_client_context.require_version_min(4, 2, 0) @async_client_context.require_change_streams async def asyncSetUp(self) -> None: await super().asyncSetUp() diff --git a/test/asynchronous/test_connections_survive_primary_stepdown_spec.py b/test/asynchronous/test_connections_survive_primary_stepdown_spec.py index 92c750c4fe..aed3c1ce7b 100644 --- a/test/asynchronous/test_connections_survive_primary_stepdown_spec.py +++ b/test/asynchronous/test_connections_survive_primary_stepdown_spec.py @@ -122,18 +122,12 @@ async def run_scenario(self, error_code, retry, pool_status_checker): async def test_not_primary_keep_connection_pool(self): await self.run_scenario(10107, True, self.verify_pool_not_cleared) - @async_client_context.require_version_min(4, 0, 0) - @async_client_context.require_version_max(4, 1, 0, -1) - @async_client_context.require_test_commands - async def test_not_primary_reset_connection_pool(self): - await self.run_scenario(10107, False, self.verify_pool_cleared) - - @async_client_context.require_version_min(4, 0, 0) + @async_client_context.require_version_min(4, 2, 0) @async_client_context.require_test_commands async def test_shutdown_in_progress(self): await self.run_scenario(91, False, self.verify_pool_cleared) - @async_client_context.require_version_min(4, 0, 0) + @async_client_context.require_version_min(4, 2, 0) @async_client_context.require_test_commands async def test_interrupted_at_shutdown(self): await self.run_scenario(11600, False, self.verify_pool_cleared) diff --git a/test/asynchronous/test_cursor.py b/test/asynchronous/test_cursor.py index 861345cb08..de836dbf80 100644 --- a/test/asynchronous/test_cursor.py +++ b/test/asynchronous/test_cursor.py @@ -1190,15 +1190,6 @@ async def test_distinct(self): self.assertEqual(["b", "c"], distinct) - @async_client_context.require_version_max(4, 1, 0, -1) - async def test_max_scan(self): - await self.db.drop_collection("test") - await self.db.test.insert_many([{} for _ in range(100)]) - - self.assertEqual(100, len(await self.db.test.find().to_list())) - self.assertEqual(50, len(await self.db.test.find().max_scan(50).to_list())) - self.assertEqual(50, len(await self.db.test.find().max_scan(90).max_scan(50).to_list())) - async def test_with_statement(self): await self.db.drop_collection("test") await self.db.test.insert_many([{} for _ in range(100)]) @@ -1600,7 +1591,6 @@ async def test_get_item(self): async def test_collation(self): await anext(self.db.test.find_raw_batches(collation=Collation("en_US"))) - @async_client_context.require_no_mmap # MMAPv1 does not support read concern async def test_read_concern(self): await self.db.get_collection("test", write_concern=WriteConcern(w="majority")).insert_one( {} diff --git a/test/asynchronous/test_custom_types.py b/test/asynchronous/test_custom_types.py index b3a51ae712..385f755a1d 100644 --- a/test/asynchronous/test_custom_types.py +++ b/test/asynchronous/test_custom_types.py @@ -953,7 +953,7 @@ async def create_targets(self, *args, **kwargs): class TestDatabaseChangeStreamsWCustomTypes( AsyncIntegrationTest, ChangeStreamsWCustomTypesTestMixin ): - @async_client_context.require_version_min(4, 0, 0) + @async_client_context.require_version_min(4, 2, 0) @async_client_context.require_change_streams async def asyncSetUp(self): await super().asyncSetUp() @@ -973,7 +973,7 @@ async def create_targets(self, *args, **kwargs): class TestClusterChangeStreamsWCustomTypes( AsyncIntegrationTest, ChangeStreamsWCustomTypesTestMixin ): - @async_client_context.require_version_min(4, 0, 0) + @async_client_context.require_version_min(4, 2, 0) @async_client_context.require_change_streams async def asyncSetUp(self): await super().asyncSetUp() diff --git a/test/asynchronous/test_encryption.py b/test/asynchronous/test_encryption.py index 9093b97ab4..a766e63915 100644 --- a/test/asynchronous/test_encryption.py +++ b/test/asynchronous/test_encryption.py @@ -451,20 +451,6 @@ class TestClientMaxWireVersion(AsyncIntegrationTest): async def asyncSetUp(self): await super().asyncSetUp() - @async_client_context.require_version_max(4, 0, 99) - async def test_raise_max_wire_version_error(self): - opts = AutoEncryptionOpts(KMS_PROVIDERS, "keyvault.datakeys") - client = await self.async_rs_or_single_client(auto_encryption_opts=opts) - msg = "Auto-encryption requires a minimum MongoDB version of 4.2" - with self.assertRaisesRegex(ConfigurationError, msg): - await client.test.test.insert_one({}) - with self.assertRaisesRegex(ConfigurationError, msg): - await client.admin.command("ping") - with self.assertRaisesRegex(ConfigurationError, msg): - await client.test.test.find_one({}) - with self.assertRaisesRegex(ConfigurationError, msg): - await client.test.test.bulk_write([InsertOne({})]) - async def test_raise_unsupported_error(self): opts = AutoEncryptionOpts(KMS_PROVIDERS, "keyvault.datakeys") client = await self.async_rs_or_single_client(auto_encryption_opts=opts) diff --git a/test/asynchronous/test_examples.py b/test/asynchronous/test_examples.py index a4ebf72df9..dd27623654 100644 --- a/test/asynchronous/test_examples.py +++ b/test/asynchronous/test_examples.py @@ -1162,7 +1162,6 @@ async def callback(session): class TestCausalConsistencyExamples(AsyncIntegrationTest): @async_client_context.require_secondaries_count(1) - @async_client_context.require_no_mmap async def test_causal_consistency(self): # Causal consistency examples client = self.client diff --git a/test/asynchronous/test_retryable_writes.py b/test/asynchronous/test_retryable_writes.py index 842233a3ef..cb9f34d554 100644 --- a/test/asynchronous/test_retryable_writes.py +++ b/test/asynchronous/test_retryable_writes.py @@ -141,40 +141,10 @@ async def asyncTearDown(self) -> None: self.deprecation_filter.stop() -class TestRetryableWritesMMAPv1(IgnoreDeprecationsTest): - knobs: client_knobs - - async def asyncSetUp(self) -> None: - await super().asyncSetUp() - # Speed up the tests by decreasing the heartbeat frequency. - self.knobs = client_knobs(heartbeat_frequency=0.1, min_heartbeat_interval=0.1) - self.knobs.enable() - self.client = await self.async_rs_or_single_client(retryWrites=True) - self.db = self.client.pymongo_test - - async def asyncTearDown(self) -> None: - self.knobs.disable() - - @async_client_context.require_no_standalone - async def test_actionable_error_message(self): - if async_client_context.storage_engine != "mmapv1": - raise SkipTest("This cluster is not running MMAPv1") - - expected_msg = ( - "This MongoDB deployment does not support retryable " - "writes. Please add retryWrites=false to your " - "connection string." - ) - for method, args, kwargs in retryable_single_statement_ops(self.db.retryable_write_test): - with self.assertRaisesRegex(OperationFailure, expected_msg): - await method(*args, **kwargs) - - class TestRetryableWrites(IgnoreDeprecationsTest): listener: OvertCommandListener knobs: client_knobs - @async_client_context.require_no_mmap async def asyncSetUp(self) -> None: await super().asyncSetUp() # Speed up the tests by decreasing the heartbeat frequency. @@ -427,7 +397,6 @@ class TestWriteConcernError(AsyncIntegrationTest): fail_insert: dict @async_client_context.require_replica_set - @async_client_context.require_no_mmap @async_client_context.require_failCommand_fail_point async def asyncSetUp(self) -> None: await super().asyncSetUp() @@ -599,7 +568,6 @@ async def test_returns_original_error_code( # TODO: Make this a real integration test where we stepdown the primary. class TestRetryableWritesTxnNumber(IgnoreDeprecationsTest): @async_client_context.require_replica_set - @async_client_context.require_no_mmap async def test_increment_transaction_id_without_sending_command(self): """Test that the txnNumber field is properly incremented, even when the first attempt fails before sending the command. diff --git a/test/asynchronous/test_session.py b/test/asynchronous/test_session.py index 1f6fb0d319..867ba0b199 100644 --- a/test/asynchronous/test_session.py +++ b/test/asynchronous/test_session.py @@ -1045,14 +1045,6 @@ async def test_writes_do_not_include_read_concern(self): lambda coll, session: coll.find({}, session=session).explain() ) - @async_client_context.require_no_standalone - @async_client_context.require_version_max(4, 1, 0) - async def test_aggregate_out_does_not_include_read_concern(self): - async def alambda(coll, session): - await (await coll.aggregate([{"$out": "aggout"}], session=session)).to_list() - - await self._test_no_read_concern(alambda) - @async_client_context.require_no_standalone async def test_get_more_does_not_include_read_concern(self): coll = self.client.pymongo_test.test @@ -1095,7 +1087,6 @@ async def test_server_not_causal(self): self.assertIsNone(act) @async_client_context.require_no_standalone - @async_client_context.require_no_mmap async def test_read_concern(self): async with self.client.start_session(causal_consistency=True) as s: coll = self.client.pymongo_test.test diff --git a/test/asynchronous/test_transactions_unified.py b/test/asynchronous/test_transactions_unified.py index 4519a0e39a..8e5b1ae181 100644 --- a/test/asynchronous/test_transactions_unified.py +++ b/test/asynchronous/test_transactions_unified.py @@ -27,7 +27,6 @@ _IS_SYNC = False -@client_context.require_no_mmap def setUpModule(): pass diff --git a/test/asynchronous/unified_format.py b/test/asynchronous/unified_format.py index 23707b942f..0569679814 100644 --- a/test/asynchronous/unified_format.py +++ b/test/asynchronous/unified_format.py @@ -503,11 +503,6 @@ async def asyncSetUp(self): raise unittest.SkipTest(f"{self.__class__.__name__} runOnRequirements not satisfied") # add any special-casing for skipping tests here - if async_client_context.storage_engine == "mmapv1": - if "retryable-writes" in self.TEST_SPEC["description"] or "retryable_writes" in str( - self.TEST_PATH - ): - raise unittest.SkipTest("MMAPv1 does not support retryWrites=True") # Handle mongos_clients for transactions tests. self.mongos_clients = [] @@ -533,13 +528,6 @@ async def asyncSetUp(self): def maybe_skip_test(self, spec): # add any special-casing for skipping tests here - if async_client_context.storage_engine == "mmapv1": - if ( - "Dirty explicit session is discarded" in spec["description"] - or "Dirty implicit session is discarded" in spec["description"] - or "Cancel server check" in spec["description"] - ): - self.skipTest("MMAPv1 does not support retryWrites=True") if "Client side error in command starting transaction" in spec["description"]: self.skipTest("Implement PYTHON-1894") if "timeoutMS applied to entire download" in spec["description"]: @@ -564,10 +552,6 @@ def maybe_skip_test(self, spec): if "csot" in class_name: if "gridfs" in class_name and sys.platform == "win32": self.skipTest("PYTHON-3522 CSOT GridFS tests are flaky on Windows") - if async_client_context.storage_engine == "mmapv1": - self.skipTest( - "MMAPv1 does not support retryable writes which is required for CSOT tests" - ) if "change" in description or "change" in class_name: self.skipTest("CSOT not implemented for watch()") if "cursors" in class_name: @@ -592,11 +576,6 @@ def maybe_skip_test(self, spec): self.skipTest("PyMongo does not support count()") if name == "listIndexNames": self.skipTest("PyMongo does not support list_index_names()") - if async_client_context.storage_engine == "mmapv1": - if name == "createChangeStream": - self.skipTest("MMAPv1 does not support change streams") - if name == "withTransaction" or name == "startTransaction": - self.skipTest("MMAPv1 does not support document-level locking") if not async_client_context.test_commands_enabled: if name == "failPoint" or name == "targetedFailPoint": self.skipTest("Test commands must be enabled to use fail points") @@ -702,8 +681,6 @@ def __raise_if_unsupported(self, opname, target, *target_types): self.fail(f"Operation {opname} not supported for entity of type {type(target)}") async def __entityOperation_createChangeStream(self, target, *args, **kwargs): - if async_client_context.storage_engine == "mmapv1": - self.skipTest("MMAPv1 does not support change streams") self.__raise_if_unsupported( "createChangeStream", target, AsyncMongoClient, AsyncDatabase, AsyncCollection ) @@ -830,14 +807,10 @@ async def _collectionOperation_listSearchIndexes(self, target, *args, **kwargs): return await (await target.list_search_indexes(name, **agg_kwargs)).to_list() async def _sessionOperation_withTransaction(self, target, *args, **kwargs): - if async_client_context.storage_engine == "mmapv1": - self.skipTest("MMAPv1 does not support document-level locking") self.__raise_if_unsupported("withTransaction", target, AsyncClientSession) return await target.with_transaction(*args, **kwargs) async def _sessionOperation_startTransaction(self, target, *args, **kwargs): - if async_client_context.storage_engine == "mmapv1": - self.skipTest("MMAPv1 does not support document-level locking") self.__raise_if_unsupported("startTransaction", target, AsyncClientSession) return await target.start_transaction(*args, **kwargs) diff --git a/test/asynchronous/utils_spec_runner.py b/test/asynchronous/utils_spec_runner.py index c83636a734..fb6c4af91c 100644 --- a/test/asynchronous/utils_spec_runner.py +++ b/test/asynchronous/utils_spec_runner.py @@ -671,12 +671,6 @@ async def run_scenario(self, scenario_def, test): server_listener = ServerAndTopologyEventListener() # Create a new client, to avoid interference from pooled sessions. client_options = self.parse_client_options(test["clientOptions"]) - # MMAPv1 does not support retryable writes. - if ( - client_options.get("retryWrites") is True - and async_client_context.storage_engine == "mmapv1" - ): - self.skipTest("MMAPv1 does not support retryWrites=True") use_multi_mongos = test["useMultipleMongoses"] host = None if use_multi_mongos: diff --git a/test/discovery_and_monitoring/errors/pre-42-InterruptedAtShutdown.json b/test/discovery_and_monitoring/errors/pre-42-InterruptedAtShutdown.json deleted file mode 100644 index 9f6ea212e5..0000000000 --- a/test/discovery_and_monitoring/errors/pre-42-InterruptedAtShutdown.json +++ /dev/null @@ -1,70 +0,0 @@ -{ - "description": "Pre-4.2 InterruptedAtShutdown error", - "uri": "mongodb://a/?replicaSet=rs", - "phases": [ - { - "description": "Primary A is discovered", - "responses": [ - [ - "a:27017", - { - "ok": 1, - "helloOk": true, - "isWritablePrimary": true, - "hosts": [ - "a:27017" - ], - "setName": "rs", - "minWireVersion": 0, - "maxWireVersion": 7 - } - ] - ], - "outcome": { - "servers": { - "a:27017": { - "type": "RSPrimary", - "setName": "rs", - "topologyVersion": null, - "pool": { - "generation": 0 - } - } - }, - "topologyType": "ReplicaSetWithPrimary", - "logicalSessionTimeoutMinutes": null, - "setName": "rs" - } - }, - { - "description": "Pre-4.2 InterruptedAtShutdown error marks server Unknown and clears the pool", - "applicationErrors": [ - { - "address": "a:27017", - "when": "afterHandshakeCompletes", - "maxWireVersion": 7, - "type": "command", - "response": { - "ok": 0, - "errmsg": "InterruptedAtShutdown", - "code": 11600 - } - } - ], - "outcome": { - "servers": { - "a:27017": { - "type": "Unknown", - "topologyVersion": null, - "pool": { - "generation": 1 - } - } - }, - "topologyType": "ReplicaSetNoPrimary", - "logicalSessionTimeoutMinutes": null, - "setName": "rs" - } - } - ] -} diff --git a/test/discovery_and_monitoring/errors/pre-42-InterruptedDueToReplStateChange.json b/test/discovery_and_monitoring/errors/pre-42-InterruptedDueToReplStateChange.json deleted file mode 100644 index 7e5f235713..0000000000 --- a/test/discovery_and_monitoring/errors/pre-42-InterruptedDueToReplStateChange.json +++ /dev/null @@ -1,70 +0,0 @@ -{ - "description": "Pre-4.2 InterruptedDueToReplStateChange error", - "uri": "mongodb://a/?replicaSet=rs", - "phases": [ - { - "description": "Primary A is discovered", - "responses": [ - [ - "a:27017", - { - "ok": 1, - "helloOk": true, - "isWritablePrimary": true, - "hosts": [ - "a:27017" - ], - "setName": "rs", - "minWireVersion": 0, - "maxWireVersion": 7 - } - ] - ], - "outcome": { - "servers": { - "a:27017": { - "type": "RSPrimary", - "setName": "rs", - "topologyVersion": null, - "pool": { - "generation": 0 - } - } - }, - "topologyType": "ReplicaSetWithPrimary", - "logicalSessionTimeoutMinutes": null, - "setName": "rs" - } - }, - { - "description": "Pre-4.2 InterruptedDueToReplStateChange error marks server Unknown and clears the pool", - "applicationErrors": [ - { - "address": "a:27017", - "when": "afterHandshakeCompletes", - "maxWireVersion": 7, - "type": "command", - "response": { - "ok": 0, - "errmsg": "InterruptedDueToReplStateChange", - "code": 11602 - } - } - ], - "outcome": { - "servers": { - "a:27017": { - "type": "Unknown", - "topologyVersion": null, - "pool": { - "generation": 1 - } - } - }, - "topologyType": "ReplicaSetNoPrimary", - "logicalSessionTimeoutMinutes": null, - "setName": "rs" - } - } - ] -} diff --git a/test/discovery_and_monitoring/errors/pre-42-LegacyNotPrimary.json b/test/discovery_and_monitoring/errors/pre-42-LegacyNotPrimary.json deleted file mode 100644 index 1635f1a856..0000000000 --- a/test/discovery_and_monitoring/errors/pre-42-LegacyNotPrimary.json +++ /dev/null @@ -1,70 +0,0 @@ -{ - "description": "Pre-4.2 LegacyNotPrimary error", - "uri": "mongodb://a/?replicaSet=rs", - "phases": [ - { - "description": "Primary A is discovered", - "responses": [ - [ - "a:27017", - { - "ok": 1, - "helloOk": true, - "isWritablePrimary": true, - "hosts": [ - "a:27017" - ], - "setName": "rs", - "minWireVersion": 0, - "maxWireVersion": 7 - } - ] - ], - "outcome": { - "servers": { - "a:27017": { - "type": "RSPrimary", - "setName": "rs", - "topologyVersion": null, - "pool": { - "generation": 0 - } - } - }, - "topologyType": "ReplicaSetWithPrimary", - "logicalSessionTimeoutMinutes": null, - "setName": "rs" - } - }, - { - "description": "Pre-4.2 LegacyNotPrimary error marks server Unknown and clears the pool", - "applicationErrors": [ - { - "address": "a:27017", - "when": "afterHandshakeCompletes", - "maxWireVersion": 7, - "type": "command", - "response": { - "ok": 0, - "errmsg": "LegacyNotPrimary", - "code": 10058 - } - } - ], - "outcome": { - "servers": { - "a:27017": { - "type": "Unknown", - "topologyVersion": null, - "pool": { - "generation": 1 - } - } - }, - "topologyType": "ReplicaSetNoPrimary", - "logicalSessionTimeoutMinutes": null, - "setName": "rs" - } - } - ] -} diff --git a/test/discovery_and_monitoring/errors/pre-42-NotPrimaryNoSecondaryOk.json b/test/discovery_and_monitoring/errors/pre-42-NotPrimaryNoSecondaryOk.json deleted file mode 100644 index 0e70ede02c..0000000000 --- a/test/discovery_and_monitoring/errors/pre-42-NotPrimaryNoSecondaryOk.json +++ /dev/null @@ -1,70 +0,0 @@ -{ - "description": "Pre-4.2 NotPrimaryNoSecondaryOk error", - "uri": "mongodb://a/?replicaSet=rs", - "phases": [ - { - "description": "Primary A is discovered", - "responses": [ - [ - "a:27017", - { - "ok": 1, - "helloOk": true, - "isWritablePrimary": true, - "hosts": [ - "a:27017" - ], - "setName": "rs", - "minWireVersion": 0, - "maxWireVersion": 7 - } - ] - ], - "outcome": { - "servers": { - "a:27017": { - "type": "RSPrimary", - "setName": "rs", - "topologyVersion": null, - "pool": { - "generation": 0 - } - } - }, - "topologyType": "ReplicaSetWithPrimary", - "logicalSessionTimeoutMinutes": null, - "setName": "rs" - } - }, - { - "description": "Pre-4.2 NotPrimaryNoSecondaryOk error marks server Unknown and clears the pool", - "applicationErrors": [ - { - "address": "a:27017", - "when": "afterHandshakeCompletes", - "maxWireVersion": 7, - "type": "command", - "response": { - "ok": 0, - "errmsg": "NotPrimaryNoSecondaryOk", - "code": 13435 - } - } - ], - "outcome": { - "servers": { - "a:27017": { - "type": "Unknown", - "topologyVersion": null, - "pool": { - "generation": 1 - } - } - }, - "topologyType": "ReplicaSetNoPrimary", - "logicalSessionTimeoutMinutes": null, - "setName": "rs" - } - } - ] -} diff --git a/test/discovery_and_monitoring/errors/pre-42-NotPrimaryOrSecondary.json b/test/discovery_and_monitoring/errors/pre-42-NotPrimaryOrSecondary.json deleted file mode 100644 index 3fefb21663..0000000000 --- a/test/discovery_and_monitoring/errors/pre-42-NotPrimaryOrSecondary.json +++ /dev/null @@ -1,70 +0,0 @@ -{ - "description": "Pre-4.2 NotPrimaryOrSecondary error", - "uri": "mongodb://a/?replicaSet=rs", - "phases": [ - { - "description": "Primary A is discovered", - "responses": [ - [ - "a:27017", - { - "ok": 1, - "helloOk": true, - "isWritablePrimary": true, - "hosts": [ - "a:27017" - ], - "setName": "rs", - "minWireVersion": 0, - "maxWireVersion": 7 - } - ] - ], - "outcome": { - "servers": { - "a:27017": { - "type": "RSPrimary", - "setName": "rs", - "topologyVersion": null, - "pool": { - "generation": 0 - } - } - }, - "topologyType": "ReplicaSetWithPrimary", - "logicalSessionTimeoutMinutes": null, - "setName": "rs" - } - }, - { - "description": "Pre-4.2 NotPrimaryOrSecondary error marks server Unknown and clears the pool", - "applicationErrors": [ - { - "address": "a:27017", - "when": "afterHandshakeCompletes", - "maxWireVersion": 7, - "type": "command", - "response": { - "ok": 0, - "errmsg": "NotPrimaryOrSecondary", - "code": 13436 - } - } - ], - "outcome": { - "servers": { - "a:27017": { - "type": "Unknown", - "topologyVersion": null, - "pool": { - "generation": 1 - } - } - }, - "topologyType": "ReplicaSetNoPrimary", - "logicalSessionTimeoutMinutes": null, - "setName": "rs" - } - } - ] -} diff --git a/test/discovery_and_monitoring/errors/pre-42-NotWritablePrimary.json b/test/discovery_and_monitoring/errors/pre-42-NotWritablePrimary.json deleted file mode 100644 index d010da0a5b..0000000000 --- a/test/discovery_and_monitoring/errors/pre-42-NotWritablePrimary.json +++ /dev/null @@ -1,70 +0,0 @@ -{ - "description": "Pre-4.2 NotWritablePrimary error", - "uri": "mongodb://a/?replicaSet=rs", - "phases": [ - { - "description": "Primary A is discovered", - "responses": [ - [ - "a:27017", - { - "ok": 1, - "helloOk": true, - "isWritablePrimary": true, - "hosts": [ - "a:27017" - ], - "setName": "rs", - "minWireVersion": 0, - "maxWireVersion": 7 - } - ] - ], - "outcome": { - "servers": { - "a:27017": { - "type": "RSPrimary", - "setName": "rs", - "topologyVersion": null, - "pool": { - "generation": 0 - } - } - }, - "topologyType": "ReplicaSetWithPrimary", - "logicalSessionTimeoutMinutes": null, - "setName": "rs" - } - }, - { - "description": "Pre-4.2 NotWritablePrimary error marks server Unknown and clears the pool", - "applicationErrors": [ - { - "address": "a:27017", - "when": "afterHandshakeCompletes", - "maxWireVersion": 7, - "type": "command", - "response": { - "ok": 0, - "errmsg": "NotWritablePrimary", - "code": 10107 - } - } - ], - "outcome": { - "servers": { - "a:27017": { - "type": "Unknown", - "topologyVersion": null, - "pool": { - "generation": 1 - } - } - }, - "topologyType": "ReplicaSetNoPrimary", - "logicalSessionTimeoutMinutes": null, - "setName": "rs" - } - } - ] -} diff --git a/test/discovery_and_monitoring/errors/pre-42-PrimarySteppedDown.json b/test/discovery_and_monitoring/errors/pre-42-PrimarySteppedDown.json deleted file mode 100644 index 02956d201d..0000000000 --- a/test/discovery_and_monitoring/errors/pre-42-PrimarySteppedDown.json +++ /dev/null @@ -1,70 +0,0 @@ -{ - "description": "Pre-4.2 PrimarySteppedDown error", - "uri": "mongodb://a/?replicaSet=rs", - "phases": [ - { - "description": "Primary A is discovered", - "responses": [ - [ - "a:27017", - { - "ok": 1, - "helloOk": true, - "isWritablePrimary": true, - "hosts": [ - "a:27017" - ], - "setName": "rs", - "minWireVersion": 0, - "maxWireVersion": 7 - } - ] - ], - "outcome": { - "servers": { - "a:27017": { - "type": "RSPrimary", - "setName": "rs", - "topologyVersion": null, - "pool": { - "generation": 0 - } - } - }, - "topologyType": "ReplicaSetWithPrimary", - "logicalSessionTimeoutMinutes": null, - "setName": "rs" - } - }, - { - "description": "Pre-4.2 PrimarySteppedDown error marks server Unknown and clears the pool", - "applicationErrors": [ - { - "address": "a:27017", - "when": "afterHandshakeCompletes", - "maxWireVersion": 7, - "type": "command", - "response": { - "ok": 0, - "errmsg": "PrimarySteppedDown", - "code": 189 - } - } - ], - "outcome": { - "servers": { - "a:27017": { - "type": "Unknown", - "topologyVersion": null, - "pool": { - "generation": 1 - } - } - }, - "topologyType": "ReplicaSetNoPrimary", - "logicalSessionTimeoutMinutes": null, - "setName": "rs" - } - } - ] -} diff --git a/test/discovery_and_monitoring/errors/pre-42-ShutdownInProgress.json b/test/discovery_and_monitoring/errors/pre-42-ShutdownInProgress.json deleted file mode 100644 index fc3a5aa6fe..0000000000 --- a/test/discovery_and_monitoring/errors/pre-42-ShutdownInProgress.json +++ /dev/null @@ -1,70 +0,0 @@ -{ - "description": "Pre-4.2 ShutdownInProgress error", - "uri": "mongodb://a/?replicaSet=rs", - "phases": [ - { - "description": "Primary A is discovered", - "responses": [ - [ - "a:27017", - { - "ok": 1, - "helloOk": true, - "isWritablePrimary": true, - "hosts": [ - "a:27017" - ], - "setName": "rs", - "minWireVersion": 0, - "maxWireVersion": 7 - } - ] - ], - "outcome": { - "servers": { - "a:27017": { - "type": "RSPrimary", - "setName": "rs", - "topologyVersion": null, - "pool": { - "generation": 0 - } - } - }, - "topologyType": "ReplicaSetWithPrimary", - "logicalSessionTimeoutMinutes": null, - "setName": "rs" - } - }, - { - "description": "Pre-4.2 ShutdownInProgress error marks server Unknown and clears the pool", - "applicationErrors": [ - { - "address": "a:27017", - "when": "afterHandshakeCompletes", - "maxWireVersion": 7, - "type": "command", - "response": { - "ok": 0, - "errmsg": "ShutdownInProgress", - "code": 91 - } - } - ], - "outcome": { - "servers": { - "a:27017": { - "type": "Unknown", - "topologyVersion": null, - "pool": { - "generation": 1 - } - } - }, - "topologyType": "ReplicaSetNoPrimary", - "logicalSessionTimeoutMinutes": null, - "setName": "rs" - } - } - ] -} diff --git a/test/discovery_and_monitoring/rs/null_election_id-pre-6.0.json b/test/discovery_and_monitoring/rs/null_election_id-pre-6.0.json index 7261fbfc2a..8a77f31c50 100644 --- a/test/discovery_and_monitoring/rs/null_election_id-pre-6.0.json +++ b/test/discovery_and_monitoring/rs/null_election_id-pre-6.0.json @@ -18,7 +18,7 @@ "setVersion": 1, "setName": "rs", "minWireVersion": 0, - "maxWireVersion": 7 + "maxWireVersion": 16 } ] ], @@ -66,7 +66,7 @@ "$oid": "000000000000000000000002" }, "minWireVersion": 0, - "maxWireVersion": 7 + "maxWireVersion": 16 } ] ], @@ -116,7 +116,7 @@ "setVersion": 1, "setName": "rs", "minWireVersion": 0, - "maxWireVersion": 7 + "maxWireVersion": 16 } ] ], @@ -167,7 +167,7 @@ "$oid": "000000000000000000000001" }, "minWireVersion": 0, - "maxWireVersion": 7 + "maxWireVersion": 16 } ] ], diff --git a/test/discovery_and_monitoring/rs/primary_mismatched_me_not_removed.json b/test/discovery_and_monitoring/rs/primary_mismatched_me_not_removed.json index 4c40093659..a55dcfc6d4 100644 --- a/test/discovery_and_monitoring/rs/primary_mismatched_me_not_removed.json +++ b/test/discovery_and_monitoring/rs/primary_mismatched_me_not_removed.json @@ -18,7 +18,7 @@ "primary": "localhost:27017", "me": "a:27017", "minWireVersion": 0, - "maxWireVersion": 7 + "maxWireVersion": 25 } ] ], @@ -55,7 +55,7 @@ "primary": "localhost:27017", "me": "localhost:27018", "minWireVersion": 0, - "maxWireVersion": 7 + "maxWireVersion": 25 } ] ], diff --git a/test/discovery_and_monitoring/rs/setversion_without_electionid-pre-6.0.json b/test/discovery_and_monitoring/rs/setversion_without_electionid-pre-6.0.json index 87029e578b..9a1ee61399 100644 --- a/test/discovery_and_monitoring/rs/setversion_without_electionid-pre-6.0.json +++ b/test/discovery_and_monitoring/rs/setversion_without_electionid-pre-6.0.json @@ -17,7 +17,7 @@ "setName": "rs", "setVersion": 2, "minWireVersion": 0, - "maxWireVersion": 7 + "maxWireVersion": 16 } ] ], @@ -56,7 +56,7 @@ "setName": "rs", "setVersion": 1, "minWireVersion": 0, - "maxWireVersion": 7 + "maxWireVersion": 16 } ] ], diff --git a/test/discovery_and_monitoring/rs/use_setversion_without_electionid-pre-6.0.json b/test/discovery_and_monitoring/rs/use_setversion_without_electionid-pre-6.0.json index a63efeac12..03195aacde 100644 --- a/test/discovery_and_monitoring/rs/use_setversion_without_electionid-pre-6.0.json +++ b/test/discovery_and_monitoring/rs/use_setversion_without_electionid-pre-6.0.json @@ -20,7 +20,7 @@ "$oid": "000000000000000000000001" }, "minWireVersion": 0, - "maxWireVersion": 7 + "maxWireVersion": 16 } ] ], @@ -64,7 +64,7 @@ "setName": "rs", "setVersion": 2, "minWireVersion": 0, - "maxWireVersion": 7 + "maxWireVersion": 16 } ] ], @@ -109,7 +109,7 @@ "$oid": "000000000000000000000002" }, "minWireVersion": 0, - "maxWireVersion": 7 + "maxWireVersion": 16 } ] ], diff --git a/test/mockupdb/test_cursor_namespace.py b/test/mockupdb/test_cursor_namespace.py index 89b897f479..7538540bda 100644 --- a/test/mockupdb/test_cursor_namespace.py +++ b/test/mockupdb/test_cursor_namespace.py @@ -40,7 +40,7 @@ class TestCursorNamespace(PyMongoTestCase): @classmethod def setUpClass(cls): - cls.server = MockupDB(auto_ismaster={"maxWireVersion": 7}) + cls.server = MockupDB(auto_ismaster={"maxWireVersion": 8}) cls.server.run() cls.client = cls.unmanaged_simple_client(cls.server.uri) diff --git a/test/test_bulk.py b/test/test_bulk.py index 77d0d6c06e..ac6f760d37 100644 --- a/test/test_bulk.py +++ b/test/test_bulk.py @@ -165,7 +165,7 @@ def _test_update_many(self, update): def test_update_many(self): self._test_update_many({"$set": {"foo": "bar"}}) - @client_context.require_version_min(4, 1, 11) + @client_context.require_version_min(4, 2, 0) def test_update_many_pipeline(self): self._test_update_many([{"$set": {"foo": "bar"}}]) @@ -206,7 +206,7 @@ def _test_update_one(self, update): def test_update_one(self): self._test_update_one({"$set": {"foo": "bar"}}) - @client_context.require_version_min(4, 1, 11) + @client_context.require_version_min(4, 2, 0) def test_update_one_pipeline(self): self._test_update_one([{"$set": {"foo": "bar"}}]) diff --git a/test/test_change_stream.py b/test/test_change_stream.py index 6099829031..59cad8925b 100644 --- a/test/test_change_stream.py +++ b/test/test_change_stream.py @@ -263,7 +263,7 @@ def test_batch_size_is_honored(self): # $changeStream.startAtOperationTime was added in 4.0.0. @no_type_check - @client_context.require_version_min(4, 0, 0) + @client_context.require_version_min(4, 2, 0) def test_start_at_operation_time(self): optime = self.get_start_at_operation_time() @@ -432,7 +432,7 @@ def test_change_operations(self): self._test_get_invalidate_event(change_stream) @no_type_check - @client_context.require_version_min(4, 1, 1) + @client_context.require_version_min(4, 2, 0) def test_start_after(self): resume_token = self.get_resume_token(invalidate=True) @@ -448,7 +448,7 @@ def test_start_after(self): self.assertEqual(change["fullDocument"], {"_id": 2}) @no_type_check - @client_context.require_version_min(4, 1, 1) + @client_context.require_version_min(4, 2, 0) def test_start_after_resume_process_with_changes(self): resume_token = self.get_resume_token(invalidate=True) @@ -553,27 +553,16 @@ def _test_update_resume_token(self, expected_rt_getter): ) # Prose test no. 1 - @client_context.require_version_min(4, 0, 7) + @client_context.require_version_min(4, 2, 0) def test_update_resume_token(self): self._test_update_resume_token(self._get_expected_resume_token) - # Prose test no. 1 - @client_context.require_version_max(4, 0, 7) - def test_update_resume_token_legacy(self): - self._test_update_resume_token(self._get_expected_resume_token_legacy) - # Prose test no. 2 - @client_context.require_version_min(4, 1, 8) + @client_context.require_version_min(4, 2, 0) def test_raises_error_on_missing_id_418plus(self): # Server returns an error on 4.1.8+ self._test_raises_error_on_missing_id(OperationFailure) - # Prose test no. 2 - @client_context.require_version_max(4, 1, 8) - def test_raises_error_on_missing_id_418minus(self): - # PyMongo raises an error - self._test_raises_error_on_missing_id(InvalidOperation) - # Prose test no. 3 @no_type_check def test_resume_on_error(self): @@ -632,38 +621,12 @@ def raise_error(): cursor.close = raise_error self.insert_one_and_check(change_stream, {"_id": 2}) - # Prose test no. 9 - @no_type_check - @client_context.require_version_min(4, 0, 0) - @client_context.require_version_max(4, 0, 7) - def test_start_at_operation_time_caching(self): - # Case 1: change stream not started with startAtOperationTime - client, listener = self.client_with_listener("aggregate") - with self.change_stream_with_client(client) as cs: - self.kill_change_stream_cursor(cs) - cs.try_next() - cmd = listener.started_events[-1].command - self.assertIsNotNone(cmd["pipeline"][0]["$changeStream"].get("startAtOperationTime")) - - # Case 2: change stream started with startAtOperationTime - listener.reset() - optime = self.get_start_at_operation_time() - with self.change_stream_with_client(client, start_at_operation_time=optime) as cs: - self.kill_change_stream_cursor(cs) - cs.try_next() - cmd = listener.started_events[-1].command - self.assertEqual( - cmd["pipeline"][0]["$changeStream"].get("startAtOperationTime"), - optime, - str([k.command for k in listener.started_events]), - ) - # Prose test no. 10 - SKIPPED # This test is identical to prose test no. 3. # Prose test no. 11 @no_type_check - @client_context.require_version_min(4, 0, 7) + @client_context.require_version_min(4, 2, 0) def test_resumetoken_empty_batch(self): client, listener = self._client_with_listener("getMore") with self.change_stream_with_client(client) as change_stream: @@ -675,7 +638,7 @@ def test_resumetoken_empty_batch(self): # Prose test no. 11 @no_type_check - @client_context.require_version_min(4, 0, 7) + @client_context.require_version_min(4, 2, 0) def test_resumetoken_exhausted_batch(self): client, listener = self._client_with_listener("getMore") with self.change_stream_with_client(client) as change_stream: @@ -685,38 +648,6 @@ def test_resumetoken_exhausted_batch(self): response = listener.succeeded_events[-1].reply self.assertEqual(resume_token, response["cursor"]["postBatchResumeToken"]) - # Prose test no. 12 - @no_type_check - @client_context.require_version_max(4, 0, 7) - def test_resumetoken_empty_batch_legacy(self): - resume_point = self.get_resume_token() - - # Empty resume token when neither resumeAfter or startAfter specified. - with self.change_stream() as change_stream: - change_stream.try_next() - self.assertIsNone(change_stream.resume_token) - - # Resume token value is same as resumeAfter. - with self.change_stream(resume_after=resume_point) as change_stream: - change_stream.try_next() - resume_token = change_stream.resume_token - self.assertEqual(resume_token, resume_point) - - # Prose test no. 12 - @no_type_check - @client_context.require_version_max(4, 0, 7) - def test_resumetoken_exhausted_batch_legacy(self): - # Resume token is _id of last change. - with self.change_stream() as change_stream: - change = self._populate_and_exhaust_change_stream(change_stream) - self.assertEqual(change_stream.resume_token, change["_id"]) - resume_point = change["_id"] - - # Resume token is _id of last change even if resumeAfter is specified. - with self.change_stream(resume_after=resume_point) as change_stream: - change = self._populate_and_exhaust_change_stream(change_stream) - self.assertEqual(change_stream.resume_token, change["_id"]) - # Prose test no. 13 @no_type_check def test_resumetoken_partially_iterated_batch(self): @@ -758,13 +689,13 @@ def test_resumetoken_uniterated_nonempty_batch_resumeafter(self): # Prose test no. 14 @no_type_check @client_context.require_no_mongos - @client_context.require_version_min(4, 1, 1) + @client_context.require_version_min(4, 2, 0) def test_resumetoken_uniterated_nonempty_batch_startafter(self): self._test_resumetoken_uniterated_nonempty_batch("start_after") # Prose test no. 17 @no_type_check - @client_context.require_version_min(4, 1, 1) + @client_context.require_version_min(4, 2, 0) def test_startafter_resume_uses_startafter_after_empty_getMore(self): # Resume should use startAfter after no changes have been returned. resume_point = self.get_resume_token() @@ -782,7 +713,7 @@ def test_startafter_resume_uses_startafter_after_empty_getMore(self): # Prose test no. 18 @no_type_check - @client_context.require_version_min(4, 1, 1) + @client_context.require_version_min(4, 2, 0) def test_startafter_resume_uses_resumeafter_after_nonempty_getMore(self): # Resume should use resumeAfter after some changes have been returned. resume_point = self.get_resume_token() @@ -827,7 +758,7 @@ def test_split_large_change(self): class TestClusterChangeStream(TestChangeStreamBase, APITestsMixin): dbs: list - @client_context.require_version_min(4, 0, 0, -1) + @client_context.require_version_min(4, 2, 0) @client_context.require_change_streams def setUp(self) -> None: super().setUp() @@ -887,7 +818,7 @@ def test_full_pipeline(self): class TestDatabaseChangeStream(TestChangeStreamBase, APITestsMixin): - @client_context.require_version_min(4, 0, 0, -1) + @client_context.require_version_min(4, 2, 0) @client_context.require_change_streams def setUp(self) -> None: super().setUp() diff --git a/test/test_connections_survive_primary_stepdown_spec.py b/test/test_connections_survive_primary_stepdown_spec.py index d923a477b5..8e9a3b8e62 100644 --- a/test/test_connections_survive_primary_stepdown_spec.py +++ b/test/test_connections_survive_primary_stepdown_spec.py @@ -122,18 +122,12 @@ def run_scenario(self, error_code, retry, pool_status_checker): def test_not_primary_keep_connection_pool(self): self.run_scenario(10107, True, self.verify_pool_not_cleared) - @client_context.require_version_min(4, 0, 0) - @client_context.require_version_max(4, 1, 0, -1) - @client_context.require_test_commands - def test_not_primary_reset_connection_pool(self): - self.run_scenario(10107, False, self.verify_pool_cleared) - - @client_context.require_version_min(4, 0, 0) + @client_context.require_version_min(4, 2, 0) @client_context.require_test_commands def test_shutdown_in_progress(self): self.run_scenario(91, False, self.verify_pool_cleared) - @client_context.require_version_min(4, 0, 0) + @client_context.require_version_min(4, 2, 0) @client_context.require_test_commands def test_interrupted_at_shutdown(self): self.run_scenario(11600, False, self.verify_pool_cleared) diff --git a/test/test_cursor.py b/test/test_cursor.py index c33f509565..83f2b79316 100644 --- a/test/test_cursor.py +++ b/test/test_cursor.py @@ -1181,15 +1181,6 @@ def test_distinct(self): self.assertEqual(["b", "c"], distinct) - @client_context.require_version_max(4, 1, 0, -1) - def test_max_scan(self): - self.db.drop_collection("test") - self.db.test.insert_many([{} for _ in range(100)]) - - self.assertEqual(100, len(self.db.test.find().to_list())) - self.assertEqual(50, len(self.db.test.find().max_scan(50).to_list())) - self.assertEqual(50, len(self.db.test.find().max_scan(90).max_scan(50).to_list())) - def test_with_statement(self): self.db.drop_collection("test") self.db.test.insert_many([{} for _ in range(100)]) @@ -1591,7 +1582,6 @@ def test_get_item(self): def test_collation(self): next(self.db.test.find_raw_batches(collation=Collation("en_US"))) - @client_context.require_no_mmap # MMAPv1 does not support read concern def test_read_concern(self): self.db.get_collection("test", write_concern=WriteConcern(w="majority")).insert_one({}) c = self.db.get_collection("test", read_concern=ReadConcern("majority")) diff --git a/test/test_custom_types.py b/test/test_custom_types.py index 9e8dbcfbeb..7360f2b18b 100644 --- a/test/test_custom_types.py +++ b/test/test_custom_types.py @@ -949,7 +949,7 @@ def create_targets(self, *args, **kwargs): class TestDatabaseChangeStreamsWCustomTypes(IntegrationTest, ChangeStreamsWCustomTypesTestMixin): - @client_context.require_version_min(4, 0, 0) + @client_context.require_version_min(4, 2, 0) @client_context.require_change_streams def setUp(self): super().setUp() @@ -967,7 +967,7 @@ def create_targets(self, *args, **kwargs): class TestClusterChangeStreamsWCustomTypes(IntegrationTest, ChangeStreamsWCustomTypesTestMixin): - @client_context.require_version_min(4, 0, 0) + @client_context.require_version_min(4, 2, 0) @client_context.require_change_streams def setUp(self): super().setUp() diff --git a/test/test_encryption.py b/test/test_encryption.py index 3a86838af3..baaefa1e73 100644 --- a/test/test_encryption.py +++ b/test/test_encryption.py @@ -451,20 +451,6 @@ class TestClientMaxWireVersion(IntegrationTest): def setUp(self): super().setUp() - @client_context.require_version_max(4, 0, 99) - def test_raise_max_wire_version_error(self): - opts = AutoEncryptionOpts(KMS_PROVIDERS, "keyvault.datakeys") - client = self.rs_or_single_client(auto_encryption_opts=opts) - msg = "Auto-encryption requires a minimum MongoDB version of 4.2" - with self.assertRaisesRegex(ConfigurationError, msg): - client.test.test.insert_one({}) - with self.assertRaisesRegex(ConfigurationError, msg): - client.admin.command("ping") - with self.assertRaisesRegex(ConfigurationError, msg): - client.test.test.find_one({}) - with self.assertRaisesRegex(ConfigurationError, msg): - client.test.test.bulk_write([InsertOne({})]) - def test_raise_unsupported_error(self): opts = AutoEncryptionOpts(KMS_PROVIDERS, "keyvault.datakeys") client = self.rs_or_single_client(auto_encryption_opts=opts) diff --git a/test/test_examples.py b/test/test_examples.py index bda5403200..13f0c94c56 100644 --- a/test/test_examples.py +++ b/test/test_examples.py @@ -1160,7 +1160,6 @@ def callback(session): class TestCausalConsistencyExamples(IntegrationTest): @client_context.require_secondaries_count(1) - @client_context.require_no_mmap def test_causal_consistency(self): # Causal consistency examples client = self.client diff --git a/test/test_retryable_writes.py b/test/test_retryable_writes.py index 598fc3fd76..5cba00bb35 100644 --- a/test/test_retryable_writes.py +++ b/test/test_retryable_writes.py @@ -141,40 +141,10 @@ def tearDown(self) -> None: self.deprecation_filter.stop() -class TestRetryableWritesMMAPv1(IgnoreDeprecationsTest): - knobs: client_knobs - - def setUp(self) -> None: - super().setUp() - # Speed up the tests by decreasing the heartbeat frequency. - self.knobs = client_knobs(heartbeat_frequency=0.1, min_heartbeat_interval=0.1) - self.knobs.enable() - self.client = self.rs_or_single_client(retryWrites=True) - self.db = self.client.pymongo_test - - def tearDown(self) -> None: - self.knobs.disable() - - @client_context.require_no_standalone - def test_actionable_error_message(self): - if client_context.storage_engine != "mmapv1": - raise SkipTest("This cluster is not running MMAPv1") - - expected_msg = ( - "This MongoDB deployment does not support retryable " - "writes. Please add retryWrites=false to your " - "connection string." - ) - for method, args, kwargs in retryable_single_statement_ops(self.db.retryable_write_test): - with self.assertRaisesRegex(OperationFailure, expected_msg): - method(*args, **kwargs) - - class TestRetryableWrites(IgnoreDeprecationsTest): listener: OvertCommandListener knobs: client_knobs - @client_context.require_no_mmap def setUp(self) -> None: super().setUp() # Speed up the tests by decreasing the heartbeat frequency. @@ -425,7 +395,6 @@ class TestWriteConcernError(IntegrationTest): fail_insert: dict @client_context.require_replica_set - @client_context.require_no_mmap @client_context.require_failCommand_fail_point def setUp(self) -> None: super().setUp() @@ -595,7 +564,6 @@ def test_returns_original_error_code( # TODO: Make this a real integration test where we stepdown the primary. class TestRetryableWritesTxnNumber(IgnoreDeprecationsTest): @client_context.require_replica_set - @client_context.require_no_mmap def test_increment_transaction_id_without_sending_command(self): """Test that the txnNumber field is properly incremented, even when the first attempt fails before sending the command. diff --git a/test/test_session.py b/test/test_session.py index 49cb9dba91..6211b380e9 100644 --- a/test/test_session.py +++ b/test/test_session.py @@ -1031,14 +1031,6 @@ def test_writes_do_not_include_read_concern(self): # Not a write, but explain also doesn't support readConcern. self._test_no_read_concern(lambda coll, session: coll.find({}, session=session).explain()) - @client_context.require_no_standalone - @client_context.require_version_max(4, 1, 0) - def test_aggregate_out_does_not_include_read_concern(self): - def alambda(coll, session): - (coll.aggregate([{"$out": "aggout"}], session=session)).to_list() - - self._test_no_read_concern(alambda) - @client_context.require_no_standalone def test_get_more_does_not_include_read_concern(self): coll = self.client.pymongo_test.test @@ -1081,7 +1073,6 @@ def test_server_not_causal(self): self.assertIsNone(act) @client_context.require_no_standalone - @client_context.require_no_mmap def test_read_concern(self): with self.client.start_session(causal_consistency=True) as s: coll = self.client.pymongo_test.test diff --git a/test/test_topology.py b/test/test_topology.py index 141b2d7f21..530cecd1f7 100644 --- a/test/test_topology.py +++ b/test/test_topology.py @@ -559,7 +559,7 @@ def test_wire_version(self): ) self.assertEqual(server.description.min_wire_version, 1) - self.assertEqual(server.description.max_wire_version, 7) + self.assertEqual(server.description.max_wire_version, 8) t.select_servers(any_server_selector, _Op.TEST) # Incompatible. diff --git a/test/test_transactions_unified.py b/test/test_transactions_unified.py index 641e05108a..4ab4885e2a 100644 --- a/test/test_transactions_unified.py +++ b/test/test_transactions_unified.py @@ -27,7 +27,6 @@ _IS_SYNC = True -@client_context.require_no_mmap def setUpModule(): pass diff --git a/test/unified_format.py b/test/unified_format.py index 84881800a2..be82294a45 100644 --- a/test/unified_format.py +++ b/test/unified_format.py @@ -502,11 +502,6 @@ def setUp(self): raise unittest.SkipTest(f"{self.__class__.__name__} runOnRequirements not satisfied") # add any special-casing for skipping tests here - if client_context.storage_engine == "mmapv1": - if "retryable-writes" in self.TEST_SPEC["description"] or "retryable_writes" in str( - self.TEST_PATH - ): - raise unittest.SkipTest("MMAPv1 does not support retryWrites=True") # Handle mongos_clients for transactions tests. self.mongos_clients = [] @@ -532,13 +527,6 @@ def setUp(self): def maybe_skip_test(self, spec): # add any special-casing for skipping tests here - if client_context.storage_engine == "mmapv1": - if ( - "Dirty explicit session is discarded" in spec["description"] - or "Dirty implicit session is discarded" in spec["description"] - or "Cancel server check" in spec["description"] - ): - self.skipTest("MMAPv1 does not support retryWrites=True") if "Client side error in command starting transaction" in spec["description"]: self.skipTest("Implement PYTHON-1894") if "timeoutMS applied to entire download" in spec["description"]: @@ -563,10 +551,6 @@ def maybe_skip_test(self, spec): if "csot" in class_name: if "gridfs" in class_name and sys.platform == "win32": self.skipTest("PYTHON-3522 CSOT GridFS tests are flaky on Windows") - if client_context.storage_engine == "mmapv1": - self.skipTest( - "MMAPv1 does not support retryable writes which is required for CSOT tests" - ) if "change" in description or "change" in class_name: self.skipTest("CSOT not implemented for watch()") if "cursors" in class_name: @@ -591,11 +575,6 @@ def maybe_skip_test(self, spec): self.skipTest("PyMongo does not support count()") if name == "listIndexNames": self.skipTest("PyMongo does not support list_index_names()") - if client_context.storage_engine == "mmapv1": - if name == "createChangeStream": - self.skipTest("MMAPv1 does not support change streams") - if name == "withTransaction" or name == "startTransaction": - self.skipTest("MMAPv1 does not support document-level locking") if not client_context.test_commands_enabled: if name == "failPoint" or name == "targetedFailPoint": self.skipTest("Test commands must be enabled to use fail points") @@ -701,8 +680,6 @@ def __raise_if_unsupported(self, opname, target, *target_types): self.fail(f"Operation {opname} not supported for entity of type {type(target)}") def __entityOperation_createChangeStream(self, target, *args, **kwargs): - if client_context.storage_engine == "mmapv1": - self.skipTest("MMAPv1 does not support change streams") self.__raise_if_unsupported("createChangeStream", target, MongoClient, Database, Collection) stream = target.watch(*args, **kwargs) self.addCleanup(stream.close) @@ -827,14 +804,10 @@ def _collectionOperation_listSearchIndexes(self, target, *args, **kwargs): return (target.list_search_indexes(name, **agg_kwargs)).to_list() def _sessionOperation_withTransaction(self, target, *args, **kwargs): - if client_context.storage_engine == "mmapv1": - self.skipTest("MMAPv1 does not support document-level locking") self.__raise_if_unsupported("withTransaction", target, ClientSession) return target.with_transaction(*args, **kwargs) def _sessionOperation_startTransaction(self, target, *args, **kwargs): - if client_context.storage_engine == "mmapv1": - self.skipTest("MMAPv1 does not support document-level locking") self.__raise_if_unsupported("startTransaction", target, ClientSession) return target.start_transaction(*args, **kwargs) diff --git a/test/utils_spec_runner.py b/test/utils_spec_runner.py index 580e7cc120..88e30435e7 100644 --- a/test/utils_spec_runner.py +++ b/test/utils_spec_runner.py @@ -671,9 +671,6 @@ def run_scenario(self, scenario_def, test): server_listener = ServerAndTopologyEventListener() # Create a new client, to avoid interference from pooled sessions. client_options = self.parse_client_options(test["clientOptions"]) - # MMAPv1 does not support retryable writes. - if client_options.get("retryWrites") is True and client_context.storage_engine == "mmapv1": - self.skipTest("MMAPv1 does not support retryWrites=True") use_multi_mongos = test["useMultipleMongoses"] host = None if use_multi_mongos: