77import logging .config
88import subprocess
99
10- from distutils .version import LooseVersion
11-
1210from testgres import InitNodeException , \
1311 StartNodeException , ExecUtilException , \
14- BackupException , QueryException
12+ BackupException , QueryException , CatchUpException
1513
1614from testgres import get_new_node , get_pg_config
1715from testgres import bound_ports
@@ -28,8 +26,6 @@ def test_double_init(self):
2826 node .init ()
2927 except InitNodeException as e :
3028 got_exception = True
31- except Exception as e :
32- pass
3329
3430 self .assertTrue (got_exception )
3531
@@ -41,8 +37,6 @@ def test_uninitialized_start(self):
4137 node .start ()
4238 except StartNodeException as e :
4339 got_exception = True
44- except Exception as e :
45- pass
4640
4741 self .assertTrue (got_exception )
4842
@@ -145,21 +139,17 @@ def test_control_data(self):
145139 node .get_control_data ()
146140 except ExecUtilException as e :
147141 got_exception = True
148- except Exception as e :
149- pass
150142 self .assertTrue (got_exception )
151143
152144 got_exception = False
153145
154146 try :
155147 node .init ()
156148 data = node .get_control_data ()
157- self .assertIsNotNode (data )
149+ self .assertIsNotNone (data )
158150 except ExecUtilException as e :
159151 print (e .message )
160152 got_exception = True
161- except Exception as e :
162- pass
163153 self .assertFalse (got_exception )
164154
165155 def test_backup_simple (self ):
@@ -257,8 +247,8 @@ def test_incorrect_catchup(self):
257247 got_exception = False
258248 try :
259249 node .catchup ()
260- except Exception as e :
261- pass
250+ except CatchUpException as e :
251+ got_exception = True
262252 self .assertTrue (got_exception )
263253
264254 def test_dump (self ):
0 commit comments