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

TestgresRemoteTests::test_ports_management is corrected#198

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
Changes fromall commits
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
36 changes: 27 additions & 9 deletionstests/test_simple_remote.py
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -976,20 +976,38 @@ def test_isolation_levels(self):
con.begin('Garbage').commit()

def test_ports_management(self):
# check that no ports have been bound yet
assert (len(bound_ports) == 0)
assert bound_ports is not None
assert type(bound_ports) == set # noqa: E721

if len(bound_ports) != 0:
logging.warning("bound_ports is not empty: {0}".format(bound_ports))

stage0__bound_ports = bound_ports.copy()

with __class__.helper__get_node() as node:
# check that we've just bound a port
assert (len(bound_ports) == 1)
assert bound_ports is not None
assert type(bound_ports) == set # noqa: E721

assert node.port is not None
assert type(node.port) == int # noqa: E721

logging.info("node port is {0}".format(node.port))

assert node.port in bound_ports
assert node.port not in stage0__bound_ports

assert stage0__bound_ports <= bound_ports
assert len(stage0__bound_ports) + 1 == len(bound_ports)

stage1__bound_ports = stage0__bound_ports.copy()
stage1__bound_ports.add(node.port)

# check that bound_ports contains our port
port_1 = list(bound_ports)[0]
port_2 = node.port
assert (port_1 == port_2)
assert stage1__bound_ports == bound_ports

# check that port has been freed successfully
assert (len(bound_ports) == 0)
assert bound_ports is not None
assert type(bound_ports) == set # noqa: E721
assert bound_ports == stage0__bound_ports

def test_exceptions(self):
str(StartNodeException('msg', [('file', 'lines')]))
Expand Down

[8]ページ先頭

©2009-2025 Movatter.jp