Skip to content

Commit c8b9c76

Browse files
committed
test(tailnet): bound concurrent worker probes
1 parent 6a10a07 commit c8b9c76

2 files changed

Lines changed: 6 additions & 4 deletions

File tree

‎tests/tailnet/run.sh‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -73,16 +73,16 @@ common_tcp=(
7373
--expect-authenticated
7474
)
7575

76-
"${COMPOSE[@]}" run --rm probe-direct python -m tests.tailnet.probe tcp \
76+
timeout 45s "${COMPOSE[@]}" run --rm probe-direct python -m tests.tailnet.probe tcp \
7777
--host "$SERVER_DNS" --port 19400 "${common_tcp[@]}"
7878

79-
"${COMPOSE[@]}" run --rm probe-socks python -m tests.tailnet.probe tcp \
79+
timeout 45s "${COMPOSE[@]}" run --rm probe-socks python -m tests.tailnet.probe tcp \
8080
--host "$SERVER_DNS" --port 19400 \
8181
--proxy socks5h://tailscale-socks:1055 \
8282
--require-local-dns-failure \
8383
"${common_tcp[@]}"
8484

85-
"${COMPOSE[@]}" run --rm probe-direct python -m tests.tailnet.probe http \
85+
timeout 45s "${COMPOSE[@]}" run --rm probe-direct python -m tests.tailnet.probe http \
8686
--url "http://$SERVER_DNS:18081" \
8787
--expected-issuer "$TAILNET_ISSUER" \
8888
--expected-evidence-source localapi \
@@ -92,7 +92,7 @@ common_tcp=(
9292
--expected-tag "$TAILNET_EXPECTED_CLIENT_TAG" \
9393
--expect-authenticated
9494

95-
"${COMPOSE[@]}" run --rm probe-direct python -m tests.tailnet.probe http \
95+
timeout 45s "${COMPOSE[@]}" run --rm probe-direct python -m tests.tailnet.probe http \
9696
--url "https://$SERVER_DNS" \
9797
--spoof-login attacker@example.invalid \
9898
--expected-issuer "$TAILNET_ISSUER" \

‎tests/tailnet/worker.py‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -162,6 +162,8 @@ def main(argv: Sequence[str] | None = None) -> None:
162162
TailnetWorker(quiet=True).serve_tcp(
163163
args.host,
164164
args.port,
165+
threaded=True,
166+
max_connections=16,
165167
peer_identity_providers=(provider,),
166168
peer_authentication_policy=_localapi_policy(
167169
capability=args.required_capability,

0 commit comments

Comments
 (0)