@@ -3010,6 +3010,8 @@ class TestNoSessionsSupport(IntegrationTest):
3010
3010
3011
3011
@classmethod
3012
3012
@client_context .require_sessions
3013
+ @unittest .skipIf (os .environ .get ("TEST_CRYPT_SHARED" ), "crypt_shared lib is installed" )
3014
+ @client_context .require_version_min (4 , 2 , - 1 )
3013
3015
def setUpClass (cls ):
3014
3016
super ().setUpClass ()
3015
3017
start_mongocryptd (cls .MONGOCRYPTD_PORT )
@@ -3028,8 +3030,6 @@ def setUp(self) -> None:
3028
3030
hello = self .mongocryptd_client .db .command ("hello" )
3029
3031
self .assertNotIn ("logicalSessionTimeoutMinutes" , hello )
3030
3032
3031
- @client_context .require_sessions
3032
- @unittest .skipIf (os .environ .get ("TEST_CRYPT_SHARED" ), "crypt_shared lib is installed" )
3033
3033
def test_implicit_session_ignored_when_unsupported (self ):
3034
3034
self .listener .reset ()
3035
3035
with self .assertRaises (OperationFailure ):
@@ -3041,16 +3041,16 @@ def test_implicit_session_ignored_when_unsupported(self):
3041
3041
self .mongocryptd_client .db .test .insert_one ({"x" : 1 })
3042
3042
3043
3043
self .assertNotIn ("lsid" , self .listener .started_events [1 ].command )
3044
+ self .mongocryptd_client .close ()
3044
3045
3045
- @client_context .require_sessions
3046
- @unittest .skipIf (os .environ .get ("TEST_CRYPT_SHARED" ), "crypt_shared lib is installed" )
3047
3046
def test_explicit_session_errors_when_unsupported (self ):
3048
3047
self .listener .reset ()
3049
3048
with self .mongocryptd_client .start_session () as s :
3050
3049
with self .assertRaises (ConfigurationError ):
3051
3050
self .mongocryptd_client .db .test .find_one (session = s )
3052
3051
with self .assertRaises (ConfigurationError ):
3053
3052
self .mongocryptd_client .db .test .insert_one ({"x" : 1 }, session = s )
3053
+ self .mongocryptd_client .close ()
3054
3054
3055
3055
3056
3056
if __name__ == "__main__" :
0 commit comments