MCPcopy Create free account
hub / github.com/Tong89/smartNode / submit_low_priority_request

Method submit_low_priority_request

tests/load/locustfile.py:110–122  ·  view source on GitHub ↗

低权重:提交低优先级请求,压力测试下预期会被拒绝。

(self)

Source from the content-addressed store, hash-verified

108
109 @task(1)
110 def submit_low_priority_request(self):
111 """低权重:提交低优先级请求,压力测试下预期会被拒绝。"""
112 payload = _fixed_payload(data_type="DATA_SLICE", priority=1)
113 with self.client.post(
114 "/api/request",
115 json=payload,
116 catch_response=True,
117 name="/api/request[low_priority]",
118 ) as resp:
119 if resp.status_code not in (200, 400, 429):
120 resp.failure(f"Unexpected status: {resp.status_code}")
121 else:
122 resp.success()
123
124 @task(1)
125 def check_health(self):

Callers

nothing calls this directly

Calls 2

_fixed_payloadFunction · 0.85
postMethod · 0.80

Tested by

no test coverage detected