Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit10ebf18

Browse files
PostgresNode::_release_resource is added
This private method releases all the allocated node resources (port and so on).PostgresNode::__exit__ calls this new method instead free_port.
1 parent18699f6 commit10ebf18

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

‎testgres/node.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -244,7 +244,7 @@ def __exit__(self, type, value, traceback):
244244
else:
245245
self._try_shutdown(attempts)
246246

247-
self.free_port()
247+
self._release_resources()
248248

249249
def__repr__(self):
250250
return"{}(name='{}', port={}, base_dir='{}')".format(
@@ -663,6 +663,9 @@ def _try_shutdown(self, max_attempts, with_force=False):
663663
ps_output,
664664
ps_command)
665665

666+
def_release_resources(self):
667+
self.free_port()
668+
666669
@staticmethod
667670
def_throw_bugcheck__unexpected_result_of_ps(result,cmd):
668671
asserttype(result)==str# noqa: E721

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp