Fix: ci issue (#17580)

### Summary

ci issue
This commit is contained in:
Jack
2026-07-30 19:13:51 +08:00
committed by GitHub
parent e25ba0b85a
commit d87d9a2881
3 changed files with 8 additions and 7 deletions

View File

@@ -360,6 +360,9 @@ func TestWaitForUser_NoSentinelEmitsMessage(t *testing.T) {
r.ServeHTTP(w, req)
frames := parseSSEFrames(t, w.Body.Bytes())
if len(frames) < 1 {
t.Fatalf("expected a non-empty SSE stream ending in [DONE], got %v", frames)
}
if frames[len(frames)-1] != "[DONE]" {
t.Fatalf("expected [DONE] tail, got %q", frames[len(frames)-1])
}
@@ -374,11 +377,7 @@ func TestWaitForUser_NoSentinelEmitsMessage(t *testing.T) {
}
// A clean run may collapse directly to the terminal `done` frame on
// this endpoint; the important contract is that it does not surface a
// wait-for-user interrupt on the happy path. The [DONE] tail is already
// validated above, so we only require a non-empty stream here.
if len(frames) < 1 {
t.Errorf("expected a non-empty SSE stream ending in [DONE], got %v", frames)
}
// wait-for-user interrupt on the happy path.
}
// TestWaitForUser_RunFuncErrorSurfacesErrorEvent verifies that a

View File

@@ -95,6 +95,6 @@ func TestSearchHandlerUpdateRejectsInvalidSearchID(t *testing.T) {
t.Fatalf("expected code 109, got %v", resp["code"])
}
if !strings.Contains(resp["message"].(string), "no authorization") {
t.Fatalf("expected 'No authorization' in message, got %v", resp["message"])
t.Fatalf("expected 'no authorization' in message, got %v", resp["message"])
}
}