before this change, we use a random address when launching rest_api_mock server, but there are chances that the randomly picked address conflicts with an already-used address on the host. and the subprocess fails right away with the returncode of 1 upon this failure, but we just continue on and check the readiness of the already-dead server. actually, we've seen test failures caused by the EADDRINUSE failure, and when we checked the readiness of the rest_api_mock by sending HTTP request and reading the response, what we had is not a JSON encoded response but a webpage, which was likely the one returned by a minio server. in this change, we * specify the "launcher" option of nodetool test suite to "unshare", so that all its tests are launched in separated namespaces. * use a random fixed address for the mock server, as the network namespaces are not shared anymore * add an option in `nodetool/conftest.py`, so that it can optionally setup the lo network interface when it is launched in a separated new network namespace. Fixes #16542 Signed-off-by: Kefu Chai <kefu.chai@scylladb.com>
4 lines
77 B
YAML
4 lines
77 B
YAML
type: Tool
|
|
coverage: false
|
|
launcher: unshare -rn pytest --run-within-unshare
|