-
Notifications
You must be signed in to change notification settings - Fork 104
E2e deflake #315
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
E2e deflake #315
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -81,24 +81,35 @@ teardown() { | |
| mesh_start_node "2" "--log-level=debug" | ||
| MESH_NETWORK=$OLD_NET | ||
|
|
||
| run mesh_wait_for_log "${MESH_PREFIX}-node-1" "PeerID:" 20 | ||
| # Gate on MCP actually answering: get_mesh_info polls below go through it, and | ||
| # a not-yet-listening sidecar burns discovery budget on empty responses. | ||
| run mesh_wait_for_log "${MESH_PREFIX}-node-1" "SAM Node Online" 30 | ||
| [[ "$status" -eq 0 ]] | ||
| run mesh_wait_for_log "${MESH_PREFIX}-node-2" "PeerID:" 20 | ||
| run mesh_wait_for_mcp_ready "1" 30 | ||
| [[ "$status" -eq 0 ]] | ||
|
|
||
| # Node 1 should eventually see 1 peer (node 2) besides the router | ||
| run mesh_wait_for_node_count "1" 1 30 | ||
| [[ "$status" -eq 0 ]] | ||
|
|
||
| # Node 2 should eventually see 1 peer (node 1) besides the router | ||
| OLD_NET=$MESH_NETWORK | ||
| MESH_NETWORK=$MESH_NETWORK_2 | ||
| run mesh_wait_for_node_count "2" 1 30 | ||
| run mesh_wait_for_log "${MESH_PREFIX}-node-2" "SAM Node Online" 30 | ||
| [[ "$status" -eq 0 ]] | ||
| run mesh_wait_for_mcp_ready "2" 30 | ||
| [[ "$status" -eq 0 ]] | ||
| MESH_NETWORK=$OLD_NET | ||
|
|
||
| local node1_peer_id | ||
| local node1_peer_id node2_peer_id | ||
| node1_peer_id=$(docker logs "${MESH_PREFIX}-node-1" 2>&1 | grep "PeerID:" | head -n 1 | awk '{print $2}' | tr -d '\r') | ||
| node2_peer_id=$(docker logs "${MESH_PREFIX}-node-2" 2>&1 | grep "PeerID:" | head -n 1 | awk '{print $2}' | tr -d '\r') | ||
|
Comment on lines
100
to
+101
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Using |
||
|
|
||
| # Assert on the specific peer, not on set size: a relayed connection can leave | ||
| # extra entries in connected_peers, so "length - 1" is not a stable count. | ||
| run mesh_wait_for_peer_connection "1" "${node2_peer_id}" 60 | ||
| [[ "$status" -eq 0 ]] | ||
|
|
||
| OLD_NET=$MESH_NETWORK | ||
| MESH_NETWORK=$MESH_NETWORK_2 | ||
| run mesh_wait_for_peer_connection "2" "${node1_peer_id}" 60 | ||
| [[ "$status" -eq 0 ]] | ||
| MESH_NETWORK=$OLD_NET | ||
|
|
||
| # 1. Setup HTTP Service on Node 1 side (default network) | ||
| docker run -d \ | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Using the heavy
python:3.12image (~1GB) to run a simplecurlcommand in a loop introduces significant overhead and can slow down test execution, potentially leading to flakes on resource-constrained CI runners. Sincecurlimages/curl:8.6.0is already used in the Helm chart and is extremely lightweight (~10MB), we should use it instead.