We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent e4c2e07 commit 85d2aa3Copy full SHA for 85d2aa3
tests/test_simple.py
@@ -1051,10 +1051,18 @@ def test_parse_pg_version(self):
1051
def test_the_same_port(self):
1052
with get_new_node() as node:
1053
node.init().start()
1054
+ self.assertTrue(node._should_free_port)
1055
+ self.assertEqual(type(node.port), int)
1056
- with get_new_node() as node2:
- node2.port = node.port
1057
- node2.init().start()
+ 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))
1066
1067
def test_simple_with_bin_dir(self):
1068
0 commit comments