Skip to content

Commit fc4e855

Browse files
committed
PYTHON-1574 Don't test TLS with Python26/Windows/MongoDB 4.0+
Python 2.6.6, the last version that shipped installers for Windows, bundles OpenSSL 0.9.8, which doesn't support TLS 1.1+. MongoDB 4.0+ requires TLS 1.1+ by default.
1 parent e4317d2 commit fc4e855

File tree

2 files changed

+51
-3
lines changed

2 files changed

+51
-3
lines changed

.evergreen/config.yml

Lines changed: 50 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1335,10 +1335,13 @@ buildvariants:
13351335
tasks:
13361336
- ".latest"
13371337

1338-
# Test CPython 2.6, 2.7, 3.5 and 3.6 against all versions on MongoDB >= 2.6
1338+
# Test CPython 2.7, 3.5 and 3.6 against all versions on MongoDB >= 2.6
13391339
# on Windows with the Microsoft Visual C++ Compiler for Python 2.7 or Visual Studio 2015.
1340-
- matrix_name: "tests-windows-vs2015-python-version"
1340+
- matrix_name: "tests-windows-vs2015-python-version-27plus"
13411341
matrix_spec: {windows-vs2015-python-version: "*", auth-ssl: "*"}
1342+
exclude_spec:
1343+
- windows-vs2015-python-version: "2.6"
1344+
auth-ssl: "*"
13421345
display_name: "Windows 64 Visual Studio 2015 ${windows-vs2015-python-version} ${auth-ssl}"
13431346
run_on: windows-64-vs2015-test
13441347
tasks:
@@ -1350,6 +1353,51 @@ buildvariants:
13501353
- ".3.0"
13511354
- ".2.6"
13521355

1356+
# Test CPython 2.6 against all versions on MongoDB >= 2.6
1357+
# on Windows with the Microsoft Visual C++ Compiler for Python 2.7.
1358+
# Python 2.6.6 (the last 2.6 version with Windows installers) bundles
1359+
# OpenSSL 0.9.8, which doesn't support TLS 1.1+. MongoDB 4.0+ requires
1360+
# TLS 1.1+ by default.
1361+
- matrix_name: "tests-windows-vs2015-python-version-26"
1362+
matrix_spec: {windows-vs2015-python-version: "2.6", auth: "*", ssl: "*"}
1363+
exclude_spec:
1364+
- windows-vs2015-python-version: "*"
1365+
auth: "noauth"
1366+
ssl: "ssl"
1367+
display_name: "Windows 64 Visual Studio 2015 ${windows-vs2015-python-version} ${auth} ${ssl}"
1368+
run_on: windows-64-vs2015-test
1369+
rules:
1370+
- if:
1371+
windows-vs2015-python-version: "*"
1372+
auth: "*"
1373+
ssl: "nossl"
1374+
then:
1375+
add_tasks:
1376+
- ".latest"
1377+
- ".4.0"
1378+
- if:
1379+
windows-vs2015-python-version: "*"
1380+
auth: "noauth"
1381+
ssl: "nossl"
1382+
then:
1383+
add_tasks:
1384+
- ".3.6"
1385+
- ".3.4"
1386+
- ".3.2"
1387+
- ".3.0"
1388+
- ".2.6"
1389+
- if:
1390+
windows-vs2015-python-version: "*"
1391+
auth: "auth"
1392+
ssl: "ssl"
1393+
then:
1394+
add_tasks:
1395+
- ".3.6"
1396+
- ".3.4"
1397+
- ".3.2"
1398+
- ".3.0"
1399+
- ".2.6"
1400+
13531401
# Storage engine tests on RHEL 6.2 (x86_64) with Python 2.7.
13541402
- matrix_name: "tests-storage-engines"
13551403
matrix_spec: {storage-engine: "*", python-version: "2.7"}

test/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@ def _connect(self, host, port, **kwargs):
185185
if sys.platform.startswith('java'):
186186
timeout_ms = 10000
187187
else:
188-
timeout_ms = 1000
188+
timeout_ms = 5000
189189
if COMPRESSORS:
190190
kwargs["compressors"] = COMPRESSORS
191191
client = pymongo.MongoClient(

0 commit comments

Comments
 (0)