fix(acceptance): 按自适应容量执行单节点压测
修正单节点验收将 hard limit 等同空闲分配容量的问题,从冷启动容量 4 开始逐级加压,并要求实际分配容量和运行任务峰值均达到目标后才计入稳定并发。\n\n异常退出时同步清理模拟器和回调收集器资源。已执行 bash -n、ShellCheck 和 production acceptance 脚本测试。
This commit is contained in:
@@ -67,6 +67,15 @@ awk '
|
||||
# shellcheck source=/dev/null
|
||||
source "$tmp/admin-request.sh"
|
||||
|
||||
awk '
|
||||
/^single_node_capacity_ready\(\)/ { capture = 1 }
|
||||
capture && /^install_single_node_load_driver\(\)/ { exit }
|
||||
capture { print }
|
||||
' "$script" >"$tmp/single-node-capacity.sh"
|
||||
|
||||
# shellcheck source=/dev/null
|
||||
source "$tmp/single-node-capacity.sh"
|
||||
|
||||
cluster_root=$tmp/repository
|
||||
git init -q "$cluster_root"
|
||||
git -C "$cluster_root" config user.name 'Acceptance Script Test'
|
||||
@@ -216,6 +225,23 @@ admin_request POST /api/admin/system/acceptance/runs/test-run/finish "$admin_bod
|
||||
[[ $(jq -r '.status' "$admin_output") == failed ]]
|
||||
[[ $(<"$admin_attempts") == 3 ]]
|
||||
|
||||
single_node_capacity_ready '1:8:4:4:normal' 8
|
||||
single_node_capacity_ready '1:8:8:8:busy' 8
|
||||
for invalid_capacity_state in \
|
||||
'0:8:4:4:normal' \
|
||||
'1:7:4:4:normal' \
|
||||
'1:8:0:4:normal' \
|
||||
'1:8:9:4:normal' \
|
||||
'1:8:4:0:normal' \
|
||||
'1:8:4:9:normal' \
|
||||
'1:8:4:4:critical' \
|
||||
'1:8:4:4:normal:extra'; do
|
||||
if single_node_capacity_ready "$invalid_capacity_state" 8; then
|
||||
echo "unsafe single-node capacity state passed: $invalid_capacity_state" >&2
|
||||
exit 1
|
||||
fi
|
||||
done
|
||||
|
||||
passing_pressure_row='2026-08-01T00:00:00Z,0,0,899,149,200,84,1535,0,32,32,0,0,0,0,2,48,0,8,8,0,0,0,16,16,0,0,1535,100'
|
||||
pressure_row_passes_live_gates "$passing_pressure_row"
|
||||
[[ $(pressure_row_live_gate_reason '2026-08-01T00:00:00Z,0,0,900,149,200,79,1535,0,32,32,0,0,0,0,2,48,0,8,8,0,0,0,16,16,0,0,1535,100') == \
|
||||
|
||||
Reference in New Issue
Block a user