10000 Releasing of reserved port in tests by dmitry-lipetsk · Pull Request #248 · postgrespro/testgres · GitHub
[go: up one dir, main page]

Skip to content

Releasing of reserved port in tests #248

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
[test] TestTestgresLocal.test_pg_ctl_wait_option is corrected
Let's "release" all our test nodes correctly.
  • Loading branch information
dmitry-lipetsk committed May 4, 2025
commit c3a43afe46915b1ffe899032ebe0a2181bb62c3a
15 changes: 12 additions & 3 deletions tests/test_testgres_common.py
Original file line number Diff line number Diff line change
Expand Up @@ -883,10 +883,20 @@ def test_backup_wrong_xlog_method(self, node_svc: PostgresNodeService):

def test_pg_ctl_wait_option(self, node_svc: PostgresNodeService):
assert isinstance(node_svc, PostgresNodeService)
C_MAX_ATTEMPTS = 50
with __class__.helper__get_node(node_svc) as node:
self.impl__test_pg_ctl_wait_option(node_svc, node)

node = __class__.helper__get_node(node_svc)
def impl__test_pg_ctl_wait_option(
self,
node_svc: PostgresNodeService,
node: PostgresNode
) -> None:
assert isinstance(node_svc, PostgresNodeService)
assert isinstance(node, PostgresNode)
assert node.status() == NodeStatus.Uninitialized

C_MAX_ATTEMPTS = 50

node.init()
assert node.status() == NodeStatus.Stopped
node.start(wait=False)
Expand Down Expand Up @@ -950,7 +960,6 @@ def test_pg_ctl_wait_option(self, node_svc: PostgresNodeService):
raise Exception("Unexpected node status: {0}.".format(s1))

logging.info("OK. Node is stopped.")
node.cleanup()

def test_replicate(self, node_svc: PostgresNodeService):
assert isinstance(node_svc, PostgresNodeService)
Expand Down
0