File tree Expand file tree Collapse file tree 1 file changed +11
-3
lines changed Expand file tree Collapse file tree 1 file changed +11
-3
lines changed Original file line number Diff line number Diff line change @@ -1051,10 +1051,18 @@ def test_parse_pg_version(self):
1051
1051
def test_the_same_port (self ):
1052
1052
with get_new_node () as node :
1053
1053
node .init ().start ()
1054
+ self .assertTrue (node ._should_free_port )
1055
+ self .assertEqual (type (node .port ), int )
1054
1056
1055
- with get_new_node () as node2 :
1056
- node2 .port = node .port
1057
- node2 .init ().start ()
1057
+ with get_new_node (port = node .port ) as node2 :
1058
+ self .assertEqual (type (node2 .port ), int )
1059
+ self .assertEqual (node2 .port , node .port )
1060
+ self .assertFalse (node2 ._should_free_port )
1061
+
1062
+ with self .assertRaises (StartNodeException ) as ctx :
1063
+ node2 .init ().start ()
1064
+
1065
+ self .assertIn ("Cannot start node" , str (ctx .exception ))
1058
1066
1059
1067
def test_simple_with_bin_dir (self ):
1060
1068
with get_new_node () as node :
You can’t perform that action at this time.
0 commit comments