@@ -94,27 +94,26 @@ def __perform_reconfigure_test(self, parameter_name, parameter_value,
94
94
getmode = oracledb .POOL_GETMODE_WAIT ,
95
95
soda_metadata_cache = False ):
96
96
creation_args = dict (min = min , max = max , increment = increment ,
97
- timeout = timeout , wait_timeout = wait_timeout ,
98
- stmtcachesize = stmtcachesize ,
99
- max_lifetime_session = max_lifetime_session ,
100
- max_sessions_per_shard = max_sessions_per_shard ,
101
- ping_interval = ping_interval , getmode = getmode ,
102
- soda_metadata_cache = soda_metadata_cache )
97
+ timeout = timeout , stmtcachesize = stmtcachesize ,
98
+ ping_interval = ping_interval , getmode = getmode )
99
+ if test_env .get_client_version () >= (12 , 1 ):
100
+ creation_args ["max_lifetime_session" ] = max_lifetime_session
101
+ if test_env .get_client_version () >= (12 , 2 ):
102
+ creation_args ["wait_timeout" ] = wait_timeout
103
+ if test_env .get_client_version () >= (18 , 3 ):
104
+ creation_args ["max_sessions_per_shard" ] = max_sessions_per_shard
105
+ if test_env .get_client_version () >= (19 , 11 ):
106
+ creation_args ["soda_metadata_cache" ] = soda_metadata_cache
107
+
103
108
reconfigure_args = {}
104
109
reconfigure_args [parameter_name ] = parameter_value
105
110
106
111
pool = test_env .get_pool (** creation_args )
107
112
conn = pool .acquire ()
108
113
pool .reconfigure (** reconfigure_args )
109
- actual_args = dict (min = pool .min , max = pool .max ,
110
- increment = pool .increment , timeout = pool .timeout ,
111
- wait_timeout = pool .wait_timeout ,
112
- stmtcachesize = pool .stmtcachesize ,
113
- max_lifetime_session = pool .max_lifetime_session ,
114
- max_sessions_per_shard = pool .max_sessions_per_shard ,
115
- ping_interval = pool .ping_interval ,
116
- getmode = pool .getmode ,
117
- soda_metadata_cache = pool .soda_metadata_cache )
114
+ actual_args = {}
115
+ for name in creation_args :
116
+ actual_args [name ] = getattr (pool , name )
118
117
expected_args = creation_args .copy ()
119
118
expected_args .update (reconfigure_args )
120
119
self .assertEqual (actual_args , expected_args )
@@ -480,13 +479,16 @@ def test_2416_test_reconfigure_pool_with_missing_values(self):
480
479
self .__perform_reconfigure_test ("max" , 20 )
481
480
self .__perform_reconfigure_test ("increment" , 5 )
482
481
self .__perform_reconfigure_test ("timeout" , 10 )
483
- self .__perform_reconfigure_test ("wait_timeout" , 8000 )
484
482
self .__perform_reconfigure_test ("stmtcachesize" , 40 )
485
- self .__perform_reconfigure_test ("max_lifetime_session" , 2000 )
486
- self .__perform_reconfigure_test ("max_sessions_per_shard" , 5 )
487
483
self .__perform_reconfigure_test ("ping_interval" , 50 )
488
484
self .__perform_reconfigure_test ("getmode" ,
489
485
oracledb .POOL_GETMODE_NOWAIT )
486
+ if test_env .get_client_version () >= (12 , 1 ):
487
+ self .__perform_reconfigure_test ("max_lifetime_session" , 2000 )
488
+ if test_env .get_client_version () >= (12 , 2 ):
489
+ self .__perform_reconfigure_test ("wait_timeout" , 8000 )
490
+ if test_env .get_client_version () >= (18 , 3 ):
491
+ self .__perform_reconfigure_test ("max_sessions_per_shard" , 5 )
490
492
if test_env .get_client_version () >= (19 , 11 ):
491
493
self .__perform_reconfigure_test ("soda_metadata_cache" , True )
492
494
0 commit comments