test: TestVisionWaitIsntTheDescribersTime gives the describer 2s, not 300ms, so a loaded run doesn't turn it red (#2444, ump45nose)
The test queues an image description behind a held request for twice the describer's limit, then needs the description back within that limit once the lane opens. At 300ms the fake's answer itself came in late on a loaded machine and on CI (mainf191d6423, test (ubuntu-latest): "no answer in 300ms"). ump45nose's patch on #2444 gives it 2s; it is queued 4s, so the queue still outlasts the limit twice over and the test still holds #2318 to its point. Run, in my own worktree at origin/main717b69f78+ this change: - go test -tags nogui -count=3 -run TestVision ./internal/gateway: ok - broken by hand: askVisionWith back on context.WithTimeout(ctx, visionTimeout) (the code before #2318) -> red, "context deadline exceeded" after the 4s queue; restored. - go test -tags nogui -race -count=5 -cpu 1,2 -run TestVision ./internal/gateway: ok (151s) at load average ~400. - gofmt -l clean; GOOS=darwin, linux and windows go vet -tags nogui ./internal/gateway: ok. - Only this _test.go file changed, and no other package imports it, so the full suite was not run. Rebased ontoe183604f0(two claude commits, not in internal/gateway) before pushing. Co-authored-by: ump45nose <52391318+ump45nose@users.noreply.github.com>
This commit is contained in:
@@ -74,7 +74,9 @@ const pastedImage = `{"model":"probe/text","messages":[{"role":"user","content":
|
||||
// what the queue left of it, and the image's turn failed. Queued for twice
|
||||
// the limit, it is still described.
|
||||
func TestVisionWaitIsntTheDescribersTime(t *testing.T) {
|
||||
visionLimits(t, 300*time.Millisecond, 10*time.Second)
|
||||
// 300ms left the describer no room once the lane opened under a loaded
|
||||
// run (#2444); queued for twice a 2s limit it still proves the point.
|
||||
visionLimits(t, 2*time.Second, 10*time.Second)
|
||||
s, u := slowEyed(t, 0)
|
||||
held := make(chan int, 1)
|
||||
go func() {
|
||||
|
||||
Reference in New Issue
Block a user