7
7
import logging .config
8
8
import subprocess
9
9
10
- from distutils .version import LooseVersion
11
-
12
10
from testgres import InitNodeException , \
13
11
StartNodeException , ExecUtilException , \
14
- BackupException , QueryException
12
+ BackupException , QueryException , CatchUpException
15
13
16
14
from testgres import get_new_node , get_pg_config
17
15
from testgres import bound_ports
@@ -28,8 +26,6 @@ def test_double_init(self):
28
26
node .init ()
29
27
except InitNodeException as e :
30
28
got_exception = True
31
- except Exception as e :
32
- pass
33
29
34
30
self .assertTrue (got_exception )
35
31
@@ -41,8 +37,6 @@ def test_uninitialized_start(self):
41
37
node .start ()
42
38
except StartNodeException as e :
43
39
got_exception = True
44
- except Exception as e :
45
- pass
46
40
47
41
self .assertTrue (got_exception )
48
42
@@ -145,21 +139,17 @@ def test_control_data(self):
145
139
node .get_control_data ()
146
140
except ExecUtilException as e :
147
141
got_exception = True
148
- except Exception as e :
149
- pass
150
142
self .assertTrue (got_exception )
151
143
152
144
got_exception = False
153
145
154
146
try :
155
147
node .init ()
156
148
data = node .get_control_data ()
157
- self .assertIsNotNode (data )
149
+ self .assertIsNotNone (data )
158
150
except ExecUtilException as e :
159
151
print (e .message )
160
152
got_exception = True
161
- except Exception as e :
162
- pass
163
153
self .assertFalse (got_exception )
164
154
165
155
def test_backup_simple (self ):
@@ -257,8 +247,8 @@ def test_incorrect_catchup(self):
257
247
got_exception = False
258
248
try :
259
249
node .catchup ()
260
- except Exception as e :
261
- pass
250
+ except CatchUpException as e :
251
+ got_exception = True
262
252
self .assertTrue (got_exception )
263
253
264
254
def test_dump (self ):
0 commit comments