Skip to content

Commit 44cf2f7

Browse files
committed
chore: Making the e2e tests less flaky
1 parent 0e011c1 commit 44cf2f7

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

test/e2e/suites/sessions/bridge-resilience.test.sh

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,9 @@ test_case "server failure doesn't kill bridge"
6969
# Use control endpoint to make next request fail
7070
curl -s -X POST "$TEST_SERVER_URL/control/fail-next?count=1" >/dev/null
7171

72-
run_xmcpc "$SESSION" tools-list
72+
# Use run_mcpc (not run_xmcpc) here: the controlled server failure would cause
73+
# run_xmcpc's 4 variants to consume the fail counter inconsistently, breaking invariant checks.
74+
run_mcpc "$SESSION" tools-list
7375
assert_failure # This request should fail
7476

7577
# Reset server and verify session recovers
@@ -82,10 +84,11 @@ test_pass
8284
test_case "multiple consecutive failures don't kill bridge"
8385
curl -s -X POST "$TEST_SERVER_URL/control/fail-next?count=3" >/dev/null
8486

85-
# These should all fail
86-
run_xmcpc "$SESSION" tools-list
87-
run_xmcpc "$SESSION" resources-list
88-
run_xmcpc "$SESSION" prompts-list
87+
# These should all fail — use run_mcpc (not run_xmcpc) to avoid consuming the fail
88+
# counter inconsistently across run_xmcpc's 4 invariant-check variants.
89+
run_mcpc "$SESSION" tools-list
90+
run_mcpc "$SESSION" resources-list
91+
run_mcpc "$SESSION" prompts-list
8992

9093
# Reset and verify
9194
curl -s -X POST "$TEST_SERVER_URL/control/reset" >/dev/null

0 commit comments

Comments
 (0)