test(acceptance): 增加视频容量阶梯场景
新增 30 至 45 秒模拟上游等待的视频容量场景,使单 Worker 自适应控制在每级突发负载中获得连续占满窗口,同时保持提交、轮询、结果处理和回调全链路。\n\n未修改生产 Worker 和厂商限流逻辑。已执行完整 Go 测试、go vet、gofmt、bash -n、ShellCheck 和生产验收脚本测试。
This commit is contained in:
@@ -279,7 +279,7 @@ func parseOptions() (options, error) {
|
||||
return options{}, errors.New("requests must be between 0 and 10000")
|
||||
}
|
||||
switch opts.profile {
|
||||
case "simulated-smoke", "simulated-all", "gemini-baseline", "gemini-multi-image", "gemini-large", "gemini-peak", "video-throughput", "video-recovery",
|
||||
case "simulated-smoke", "simulated-all", "gemini-baseline", "gemini-multi-image", "gemini-large", "gemini-peak", "video-throughput", "video-capacity", "video-recovery",
|
||||
"mixed-soak", "mixed-overload":
|
||||
if opts.emulatorURL == "" {
|
||||
return options{}, errors.New("AI_GATEWAY_ACCEPTANCE_EMULATOR_URL is required for simulated profiles")
|
||||
@@ -365,6 +365,12 @@ func run(ctx context.Context, opts options) ([]phaseResult, error) {
|
||||
requests = opts.requestCount
|
||||
}
|
||||
result = runVideo(ctx, client, opts, name, opts.shardRequestCount(requests), false, opts.emulatorFixtureURLs(), false, opts.shardIndex, opts.shardCount)
|
||||
case "video-capacity":
|
||||
requests := 1200
|
||||
if opts.requestCount > 0 {
|
||||
requests = opts.requestCount
|
||||
}
|
||||
result = runVideo(ctx, client, opts, name, opts.shardRequestCount(requests), false, opts.emulatorFixtureURLs(), false, opts.shardIndex, opts.shardCount)
|
||||
case "video-recovery":
|
||||
result = runVideo(ctx, client, opts, name, opts.shardRequestCount(96), true, opts.emulatorFixtureURLs(), false, opts.shardIndex, opts.shardCount)
|
||||
case "mixed-soak", "mixed-overload":
|
||||
@@ -659,6 +665,9 @@ func runVideo(
|
||||
if longRun {
|
||||
prompt += " acceptance-long-recovery"
|
||||
}
|
||||
if name == "video-capacity" {
|
||||
prompt += " acceptance-capacity-ladder"
|
||||
}
|
||||
if !realUpstream && logicalIndex%4 == 0 {
|
||||
prompt += " acceptance-force-conversion"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user