Skip to content

Commit

Permalink
allow two possible error messages in webserver test (#7749)
Browse files Browse the repository at this point in the history
GitOrigin-RevId: f0b9024c743eae162260a3a51a8826d992248685
  • Loading branch information
zxqfd555-pw authored and Manul from Pathway committed Nov 26, 2024
1 parent 8e39458 commit a59f42c
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion integration_tests/webserver/test_rest_connector.py
Original file line number Diff line number Diff line change
Expand Up @@ -236,8 +236,13 @@ class InputSchema(pw.Schema):
pw.io.csv.write(sum, output_path)
pw.io.csv.write(sum_dup, output_path)

with pytest.raises(OSError, match="error while attempting to bind on address"):
with pytest.raises(OSError) as exc_info:
pw.run()
error_message = str(exc_info.value)
assert (
"error while attempting to bind on address" in error_message
or "Address already in use" in error_message
)


def _test_server_two_endpoints(
Expand Down

0 comments on commit a59f42c

Please sign in to comment.