File tree Expand file tree Collapse file tree 2 files changed +17
-1
lines changed Expand file tree Collapse file tree 2 files changed +17
-1
lines changed Original file line number Diff line number Diff line change 51
51
TestCreator ,
52
52
TopologyEventListener ,
53
53
camel_to_snake_args ,
54
+ is_greenthread_patched ,
54
55
rs_or_single_client ,
55
56
wait_until ,
56
57
)
@@ -334,6 +335,10 @@ def test_use_after_close(self):
334
335
not hasattr (os , "register_at_fork" ),
335
336
"register_at_fork not available in this version of Python" ,
336
337
)
338
+ @unittest .skipIf (
339
+ is_greenthread_patched (),
340
+ "gevent and eventlet do not support POSIX-style forking." ,
341
+ )
337
342
def test_fork (self ):
338
343
opts = AutoEncryptionOpts (KMS_PROVIDERS , "keyvault.datakeys" )
339
344
client = rs_or_single_client (auto_encryption_opts = opts )
Original file line number Diff line number Diff line change 17
17
import os
18
18
from multiprocessing import Pipe
19
19
from test import IntegrationTest , client_context
20
- from test .utils import ExceptionCatchingThread , rs_or_single_client
20
+ from test .utils import (
21
+ ExceptionCatchingThread ,
22
+ is_greenthread_patched ,
23
+ rs_or_single_client ,
24
+ )
21
25
from unittest import skipIf
22
26
23
27
from bson .objectid import ObjectId
@@ -32,6 +36,10 @@ def setUpModule():
32
36
@skipIf (
33
37
not hasattr (os , "register_at_fork" ), "register_at_fork not available in this version of Python"
34
38
)
39
+ @skipIf (
40
+ is_greenthread_patched (),
41
+ "gevent and eventlet do not support POSIX-style forking." ,
42
+ )
35
43
class TestFork (IntegrationTest ):
36
44
def test_lock_client (self ):
37
45
"""
@@ -156,5 +164,8 @@ def action(client):
156
164
for t in threads :
157
165
t .join ()
158
166
167
+ for t in threads :
168
+ self .assertIsNone (t .exc )
169
+
159
170
for c in clients :
160
171
c .close ()
You can’t perform that action at this time.
0 commit comments