File tree Expand file tree Collapse file tree 2 files changed +7
-0
lines changed
Expand file tree Collapse file tree 2 files changed +7
-0
lines changed Original file line number Diff line number Diff line change @@ -54,6 +54,9 @@ def make_session(test_server_version=False, **kwargs):
5454
5555 env_file = env_filename_from_keyword_args (kwargs )
5656 session = iRODSSession (irods_env_file = env_file , ** kwargs )
57+ # irods.test.helpers version of this function sets test_server_version True by default, so
58+ # that sessions generated for the test methods will abort on connecting with a server that
59+ # is too recent. This is a way to ensure that tests don't fail due to a server mismatch.
5760 if test_server_version :
5861 connected_version = _get_server_version_for_test (session , curtail_length = 3 )
5962 advertised_version = _IRODS_VERSION [:3 ]
Original file line number Diff line number Diff line change @@ -181,6 +181,10 @@ def ET(xml_type=(), server_version=None):
181181
182182logger = logging .getLogger (__name__ )
183183
184+ # Advertised server version compatibility. More recent servers are not guaranteed to work.
185+ # We avail ourselves of this macro in running tests to abort if the session has connected
186+ # to a server that is too new.
187+
184188_IRODS_VERSION = (5 , 0 , 2 , "d" )
185189
186190UNICODE = str
You can’t perform that action at this time.
0 commit comments