Skip to content

Commit 016f8de

Browse files
committed
PYTHON-2155 Add MongoDB 4.4 to testing matrix
1 parent 42aafd7 commit 016f8de

File tree

2 files changed

+51
-23
lines changed

2 files changed

+51
-23
lines changed

.evergreen/config.yml

Lines changed: 39 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -986,6 +986,33 @@ tasks:
986986
TOPOLOGY: "sharded_cluster"
987987
- func: "run tests"
988988

989+
- name: "test-4.4-standalone"
990+
tags: ["4.4", "standalone"]
991+
commands:
992+
- func: "bootstrap mongo-orchestration"
993+
vars:
994+
VERSION: "4.4"
995+
TOPOLOGY: "server"
996+
- func: "run tests"
997+
998+
- name: "test-4.4-replica_set"
999+
tags: ["4.4", "replica_set"]
1000+
commands:
1001+
- func: "bootstrap mongo-orchestration"
1002+
vars:
1003+
VERSION: "4.4"
1004+
TOPOLOGY: "replica_set"
1005+
- func: "run tests"
1006+
1007+
- name: "test-4.4-sharded_cluster"
1008+
tags: ["4.4", "sharded_cluster"]
1009+
commands:
1010+
- func: "bootstrap mongo-orchestration"
1011+
vars:
1012+
VERSION: "4.4"
1013+
TOPOLOGY: "sharded_cluster"
1014+
- func: "run tests"
1015+
9891016
- name: "test-latest-standalone"
9901017
tags: ["latest", "standalone"]
9911018
commands:
@@ -1585,6 +1612,7 @@ buildvariants:
15851612
display_name: "${platform} ${auth-ssl}"
15861613
tasks: &all-server-versions
15871614
- ".latest"
1615+
- ".4.4"
15881616
- ".4.2"
15891617
- ".4.0"
15901618
- ".3.6"
@@ -1604,6 +1632,7 @@ buildvariants:
16041632
display_name: "Encryption ${platform} ${auth-ssl}"
16051633
tasks: &encryption-server-versions
16061634
- ".latest"
1635+
- ".4.4"
16071636
- ".4.2"
16081637
- ".4.0"
16091638
- ".2.6"
@@ -1669,6 +1698,7 @@ buildvariants:
16691698
display_name: "${platform} ${auth-ssl}"
16701699
tasks:
16711700
- ".latest"
1701+
- ".4.4"
16721702
- ".4.2"
16731703
- ".4.0"
16741704
- ".3.6"
@@ -1691,6 +1721,7 @@ buildvariants:
16911721
display_name: "${platform} ${auth} ${ssl}"
16921722
tasks:
16931723
- ".latest"
1724+
- ".4.4"
16941725
- ".4.2"
16951726
- ".4.0"
16961727
- ".3.6"
@@ -1739,6 +1770,7 @@ buildvariants:
17391770
display_name: "${platform} ${auth-ssl}"
17401771
tasks:
17411772
- ".latest"
1773+
- ".4.4"
17421774
- ".4.2"
17431775
- ".4.0"
17441776
- ".3.6"
@@ -1753,6 +1785,7 @@ buildvariants:
17531785
display_name: "${platform} ${auth-ssl}"
17541786
tasks:
17551787
- ".latest"
1788+
- ".4.4"
17561789
- ".4.2"
17571790
variables:
17581791
set_xtrace_on: on
@@ -1865,6 +1898,7 @@ buildvariants:
18651898
display_name: "${c-extensions} ${python-version} ${platform} ${auth} ${ssl} ${coverage}"
18661899
tasks:
18671900
- ".latest"
1901+
- ".4.4"
18681902
- ".4.2"
18691903
- ".4.0"
18701904
- ".3.6"
@@ -1897,6 +1931,7 @@ buildvariants:
18971931
display_name: "${compression} ${c-extensions} ${python-version} ${platform}"
18981932
tasks:
18991933
- "test-latest-standalone"
1934+
- "test-4.4-standalone"
19001935
- "test-4.2-standalone"
19011936
rules:
19021937
# Server versions 3.6 and 4.0 support snappy and zlib.
@@ -1930,31 +1965,15 @@ buildvariants:
19301965
python-version-windows: "*"
19311966
auth-ssl: "*"
19321967
display_name: "${platform} ${python-version-windows} ${auth-ssl}"
1933-
tasks:
1934-
- ".latest"
1935-
- ".4.2"
1936-
- ".4.0"
1937-
- ".3.6"
1938-
- ".3.4"
1939-
- ".3.2"
1940-
- ".3.0"
1941-
- ".2.6"
1968+
tasks: *all-server-versions
19421969

19431970
- matrix_name: "tests-windows-python-version-32-bit"
19441971
matrix_spec:
19451972
platform: windows-64-vsMulti-small
19461973
python-version-windows-32: "*"
19471974
auth-ssl: "*"
19481975
display_name: "${platform} ${python-version-windows-32} ${auth-ssl}"
1949-
tasks:
1950-
- ".latest"
1951-
- ".4.2"
1952-
- ".4.0"
1953-
- ".3.6"
1954-
- ".3.4"
1955-
- ".3.2"
1956-
- ".3.0"
1957-
- ".2.6"
1976+
tasks: *all-server-versions
19581977

19591978
- matrix_name: "tests-python-version-requires-openssl-102-plus-test-ssl"
19601979
matrix_spec:
@@ -1964,6 +1983,7 @@ buildvariants:
19641983
display_name: "${python-version} OpenSSL 1.0.2 ${platform} ${auth-ssl}"
19651984
tasks:
19661985
- ".latest"
1986+
- ".4.4"
19671987
- ".4.2"
19681988
- ".4.0"
19691989
- ".3.6"
@@ -2012,6 +2032,7 @@ buildvariants:
20122032
then:
20132033
add_tasks:
20142034
- "test-latest-standalone"
2035+
- "test-4.4-standalone"
20152036
- "test-4.2-standalone"
20162037
- "test-4.0-standalone"
20172038
- "test-3.6-standalone"

test/test_database.py

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -367,16 +367,23 @@ def test_validate_collection(self):
367367
self.assertTrue(db.validate_collection(db.test, scandata=True))
368368
self.assertTrue(db.validate_collection(db.test, scandata=True, full=True))
369369
self.assertTrue(db.validate_collection(db.test, True, True))
370-
if client_context.version.at_least(4, 3, 3):
371-
self.assertTrue(db.validate_collection(db.test, background=True))
372-
self.assertTrue(db.validate_collection(db.test, background=False))
370+
371+
@client_context.require_version_min(4, 3, 3)
372+
def test_validate_collection_background(self):
373+
db = self.client.pymongo_test
374+
db.test.insert_one({"dummy": u"object"})
375+
coll = db.test
376+
self.assertTrue(db.validate_collection(coll, background=False))
377+
# The inMemory storage engine does not support background=True.
378+
if client_context.storage_engine != 'inMemory':
379+
self.assertTrue(db.validate_collection(coll, background=True))
373380
self.assertTrue(
374-
db.validate_collection(db.test, scandata=True, background=True))
381+
db.validate_collection(coll, scandata=True, background=True))
375382
# The server does not support background=True with full=True.
376383
# Assert that we actually send the background option by checking
377384
# that this combination fails.
378385
with self.assertRaises(OperationFailure):
379-
db.validate_collection(db.test, full=True, background=True)
386+
db.validate_collection(coll, full=True, background=True)
380387

381388
@client_context.require_no_mongos
382389
def test_profiling_levels(self):

0 commit comments

Comments
 (0)