aglinxinyuan opened a new pull request, #6889:
URL: https://github.com/apache/texera/pull/6889

   ### What changes were proposed in this PR?
   
   Extends the existing unit spec from 87 to **126 tests** (+39), covering the 
previously-untested upstream-facing code (`fetchSearchResults`, 
`fetchAllModelsForTask`, `extractNextLink`, `buildSimplifiedList`, 
`hasModelsForTask`, the `/tasks` walk, and `streamMediaWithCap`).
   
   The Hub URLs are hard-coded in the resource, so there is no seam to point at 
a local server; instead the spec swaps Unirest's global HTTP client for an 
in-spec stub `Client`/`RawResponse` that serves canned status/body/headers and 
records the outgoing URL and Authorization header. Real Unirest plumbing still 
runs (including `asObject`, so the media proxy is exercised end to end), and 
`afterEach` resets the config. **No network calls** — the 50 MiB cap test uses 
a lazily generated stream.
   
   Covered: search vs browse listing (field simplification and defaulting, 
exact query parameters, bearer-token forwarding, cache hits and token-scoped 
cache bypass), Link-header pagination including the `MAX_PAGES=50` cut-off and 
mid-pagination failure, the truncation-header boundary at exactly 
`SEARCH_LIMIT`, task listing with warm-model filtering and label fallback, and 
all three `413` size-cap paths in the media proxy.
   
   No source changes.
   
   ### Any related issues, documentation, discussions?
   
   Closes #6886.
   
   ### How was this PR tested?
   
   `sbt -java-home <jbr-17> "WorkflowExecutionService/testOnly 
*HuggingFaceModelResourceSpec"` -> 126 succeeded, 0 failed. 
`Test/scalafmtCheck` + `Test/scalafix --check` clean.
   
   ### Was this PR authored or co-authored using generative AI tooling?
   
   Generated-by: Claude Code (Opus 4.8 [1M context])


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to