Skip to content

Commit ff6f168

Browse files
committed
[tests/scenarios] launching python nodes with producer and consumers
[just] trying to fix `wait-pods` error: `no matching resources found`
1 parent 5bb27ee commit ff6f168

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

justfile

+3
Original file line numberDiff line numberDiff line change
@@ -536,6 +536,9 @@ yank-ns kube_context namespace:
536536
[group('utils')]
537537
@wait-pods kube_context namespace:
538538
echo "Waiting for all pods to be ready in cluster={{ kube_context }} namespace={{ namespace }}"
539+
# Wait for at least one pod to appear (timeout after 5 minutes)
540+
timeout 300 bash -c 'until kubectl get pods --context {{ kube_context }} --namespace {{ namespace }} 2>/dev/null | grep -q ""; do sleep 5; done'
541+
539542
kubectl wait --for=condition=ready pod --all --timeout=300s --context {{ kube_context }} --namespace {{ namespace }}
540543

541544
# if the above doesn't wait as we expect the drop the above and use the below

tests/scenariosv2/flows/utils.py

+8-1
Original file line numberDiff line numberDiff line change
@@ -22,4 +22,11 @@ def launch_server(ctx: SimulatorContext, server_url: str, server_name: str):
2222
ctx.logger.info(f"Launching python server '{server_name}' at {server_url}")
2323
parsed_url = urlparse(server_url)
2424
port = parsed_url.port
25-
sy.orchestra.launch(name=server_name, reset=True, dev_mode=True, port=port)
25+
sy.orchestra.launch(
26+
name=server_name,
27+
reset=True,
28+
dev_mode=True,
29+
port=port,
30+
create_producer=True,
31+
n_consumers=1,
32+
)

0 commit comments

Comments
 (0)