Skip to content
Merged
Changes from all 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
12 changes: 7 additions & 5 deletions ravendb/tests/test_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -168,9 +168,10 @@ def server_path(self) -> str:

@property
def command_arguments(self) -> List[str]:
# No ServerUrl.Tcp: the server then listens for TCP on a free port of the ServerUrl host and tells
# clients which one, so a fixed port can never be taken by another process or a parallel run.
return [
"--ServerUrl=http://127.0.0.1:0",
"--ServerUrl.Tcp=tcp://127.0.0.1:38881",
"--Features.Availability=Experimental",
]

Expand All @@ -185,12 +186,13 @@ def get_server_path(self) -> str:

@property
def command_arguments(self) -> List[str]:
https_server_url = self.https_server_url
tcp_server_url = https_server_url.replace("https", "tcp", 1).rsplit(":", 1)[0] + ":38882"
# TCP gets a free port picked by the OS, which the server reports to clients. It is bound to a single
# IPv4 address on purpose: given a host name such as "localhost", the server binds every address
# the name resolves to and keeps those it could bind, so an IPv4 client might find nothing there.
return [
f"--Security.Certificate.Path={self.server_certificate_path}",
f"--ServerUrl={https_server_url}",
f"--ServerUrl.Tcp={tcp_server_url}",
f"--ServerUrl={self.https_server_url}",
"--ServerUrl.Tcp=tcp://127.0.0.1:0",
]

@property
Expand Down
Loading