File tree Expand file tree Collapse file tree 2 files changed +2
-10
lines changed Expand file tree Collapse file tree 2 files changed +2
-10
lines changed Original file line number Diff line number Diff line change 8
8
import stat
9
9
import tarfile
10
10
from pathlib import Path
11
- from time import sleep
12
11
from urllib import request
13
12
14
13
from utils import (
@@ -322,7 +321,6 @@ def handle_test_env() -> None:
322
321
env ["SERVER_TYPE" ] = server_type
323
322
env ["OCSP_ALGORITHM" ] = ocsp_algo
324
323
run_command (f"bash { DRIVERS_TOOLS } /.evergreen/ocsp/setup.sh" , env = env )
325
- sleep (5 )
326
324
327
325
# The mock OCSP responder MUST BE started before the mongod as the mongod expects that
328
326
# a responder will be available upon startup.
@@ -339,7 +337,6 @@ def handle_test_env() -> None:
339
337
elif opts .quiet :
340
338
cmd .append ("-q" )
341
339
run_command (cmd , cwd = DRIVERS_TOOLS )
342
- sleep (5 )
343
340
344
341
if SSL != "nossl" :
345
342
if not DRIVERS_TOOLS :
Original file line number Diff line number Diff line change 19
19
import os
20
20
import sys
21
21
import unittest
22
+ from pathlib import Path
22
23
23
24
import pytest
24
25
38
39
FORMAT = "%(asctime)s %(levelname)s %(module)s %(message)s"
39
40
logging .basicConfig (format = FORMAT , level = logging .DEBUG )
40
41
41
- if sys .platform == "win32" :
42
- # The non-stapled OCSP endpoint check is slow on Windows.
43
- TIMEOUT_MS = 5000
44
- else :
45
- TIMEOUT_MS = 500
46
-
47
42
48
43
def _connect (options ):
49
- uri = f"mongodb://localhost:27017/?serverSelectionTimeoutMS={ TIMEOUT_MS } &tlsCAFile={ CA_FILE } &{ options } "
44
+ uri = f"mongodb://localhost:27017/?serverSelectionTimeoutMS=5000 &tlsCAFile={ Path ( CA_FILE ). as_posix () } &{ options } "
50
45
print (uri )
51
46
try :
52
47
client = pymongo .MongoClient (uri )
You can’t perform that action at this time.
0 commit comments