File tree Expand file tree Collapse file tree 1 file changed +9
-9
lines changed Expand file tree Collapse file tree 1 file changed +9
-9
lines changed Original file line number Diff line number Diff line change @@ -158,15 +158,15 @@ def test_child_process_dies(self):
158158 def test_upgrade_node (self ):
159159 old_bin_dir = os .path .dirname (get_bin_path ("pg_config" ))
160160 new_bin_dir = os .path .dirname (get_bin_path ("pg_config" ))
161- node_old = get_new_node (prefix = 'node_old' , bin_dir = old_bin_dir )
162- node_old .init ()
163- node_old .start ()
164- node_old .stop ()
165- node_new = get_new_node (prefix = 'node_new' , bin_dir = new_bin_dir )
166- node_new .init (cached = False )
167- res = node_new .upgrade_from (old_node = node_old )
168- node_new .start ()
169- assert (b'Upgrade Complete' in res )
161+ with get_new_node (prefix = 'node_old' , bin_dir = old_bin_dir ) as node_old :
162+ node_old .init ()
163+ node_old .start ()
164+ node_old .stop ()
165+ with get_new_node (prefix = 'node_new' , bin_dir = new_bin_dir ) as node_new :
166+ node_new .init (cached = False )
167+ res = node_new .upgrade_from (old_node = node_old )
168+ node_new .start ()
169+ assert (b'Upgrade Complete' in res )
170170
171171 class tagPortManagerProxy :
172172 sm_prev_testgres_reserve_port = None
You can’t perform that action at this time.
0 commit comments