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):
10511051 def test_the_same_port (self ):
10521052 with get_new_node () as node :
10531053 node .init ().start ()
1054+ self .assertTrue (node ._should_free_port )
1055+ self .assertEqual (type (node .port ), int )
10541056
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 ))
10581066
10591067 def test_simple_with_bin_dir (self ):
10601068 with get_new_node () as node :
You can’t perform that action at this time.
0 commit comments