File tree Expand file tree Collapse file tree 2 files changed +7
-5
lines changed Expand file tree Collapse file tree 2 files changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -445,8 +445,7 @@ def get_child_processes(self):
445445 ''' Returns child processes for this node '''
446446
447447 if psutil is None :
448- warnings .warn ("psutil module is not installed" )
449- return None
448+ raise TestgresException ("psutil module is not installed" )
450449
451450 try :
452451 postmaster = psutil .Process (self .pid )
Original file line number Diff line number Diff line change 2121 BackupException , \
2222 QueryException , \
2323 CatchUpException , \
24- TimeoutException
24+ TimeoutException , \
25+ TestgresException
2526
2627from testgres import \
2728 TestgresConfig , \
@@ -739,8 +740,10 @@ def test_pids(self):
739740 with backup .spawn_replica ('repl' , True ) as repl :
740741 repl .start ()
741742 if psutil is None :
742- self .assertIsNone (master .auxiliary_pids )
743- self .assertIsNone (repl .auxiliary_pids )
743+ with self .assertRaises (TestgresException ):
744+ master .auxiliary_pids
745+ with self .assertRaises (TestgresException ):
746+ self .assertIsNone (repl .auxiliary_pids )
744747 else :
745748 master_pids = master .auxiliary_pids
746749 for ptype in master_processes :
You can’t perform that action at this time.
0 commit comments