8000 [test] TestTestgresLocal.test_pg_ctl_wait_option is corrected · postgrespro/testgres@c3a43af · GitHub
[go: up one dir, main page]

Skip to content

Commit c3a43af

Browse files
[test] TestTestgresLocal.test_pg_ctl_wait_option is corrected
Let's "release" all our test nodes correctly.
1 parent 5f8f5dd commit c3a43af

File tree

1 file changed

+12
-3
lines changed

1 file changed

+12
-3
lines changed

tests/test_testgres_common.py

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -883,10 +883,20 @@ def test_backup_wrong_xlog_method(self, node_svc: PostgresNodeService):
883883

884884
def test_pg_ctl_wait_option(self, node_svc: PostgresNodeServ 8000 ice):
885885
assert isinstance(node_svc, PostgresNodeService)
886-
C_MAX_ATTEMPTS = 50
886+
with __class__.helper__get_node(node_svc) as node:
887+
self.impl__test_pg_ctl_wait_option(node_svc, node)
887888

888-
node = __class__.helper__get_node(node_svc)
889+
def impl__test_pg_ctl_wait_option(
890+
self,
891+
node_svc: PostgresNodeService,
892+
node: PostgresNode
893+
) -> None:
894+
assert isinstance(node_svc, PostgresNodeService)
895+
assert isinstance(node, PostgresNode)
889896
assert node.status() == NodeStatus.Uninitialized
897+
898+
C_MAX_ATTEMPTS = 50
899+
890900
node.init()
891901
assert node.status() == NodeStatus.Stopped
892902
node.start(wait=False)
@@ -950,7 +960,6 @@ def test_pg_ctl_wait_option(self, node_svc: PostgresNodeService):
950960
raise Exception("Unexpected node status: {0}.".format(s1))
951961

952962
logging.info("OK. Node is stopped.")
953-
node.cleanup()
954963

955964
def test_replicate(self, node_svc: PostgresNodeService):
956965
assert isinstance(node_svc, PostgresNodeService)

0 commit comments

Comments
 (0)
0