We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 401ed0c commit 2cdde3dCopy full SHA for 2cdde3d
sgl-router/py_test/integration_mock/test_circuit_breaker.py
@@ -32,8 +32,21 @@ def post_once():
32
timeout=3,
33
)
34
35
- saw_503 = False
+ # should see 500 when worker actually starts, before that should see 503
36
+ saw_500 = False
37
for _ in range(8):
38
+ r = post_once()
39
+ if r.status_code == 500:
40
+ # Worker starts, continue to circuit breaker test
41
+ saw_500 = True
42
+ break
43
+ assert (
44
+ r.status_code == 503
45
+ ), "Should only see 503 when waiting for worker to start"
46
+ assert saw_500, "Worker didn't start after 8 requests"
47
+
48
+ saw_503 = False
49
+ for _ in range(4):
50
r = post_once()
51
if r.status_code == 503:
52
saw_503 = True
0 commit comments