Commit 548a66a
get_test_results() in the test_results_resolver Lambda raised an
unhandled ValueError ("Test run ... processing completed, evaluating
results") when a run reached a terminal state but the evaluation
aggregation never wrote testRunResult — i.e. aggregation is still
running, timed out, or failed silently (reproduced on a 3463-document
run). The exception surfaced as an opaque error and Test Studio spun on
"Loading..." indefinitely.
Return a structured partial TestRun (true status, file counts, and
metadata; metric fields omitted) instead of raising. The GraphQL TestRun
type already makes every metric field nullable, so the partial response
is schema-valid. This also prevents a single not-yet-aggregated run from
failing an entire compareTestRuns request.
The deeper question of why aggregation can stall on very large runs is
left as a documented follow-up.
Add a regression unit test covering the terminal-status / no-cached-
metrics path.
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent 52cd78e commit 548a66a
3 files changed
Lines changed: 71 additions & 5 deletions
File tree
- lib/idp_common_pkg/tests/unit
- nested/appsync/src/lambda/test_results_resolver
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
| 35 | + | |
35 | 36 | | |
36 | 37 | | |
37 | 38 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
213 | 213 | | |
214 | 214 | | |
215 | 215 | | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
216 | 261 | | |
217 | 262 | | |
218 | 263 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
408 | 408 | | |
409 | 409 | | |
410 | 410 | | |
411 | | - | |
| 411 | + | |
| 412 | + | |
| 413 | + | |
| 414 | + | |
| 415 | + | |
| 416 | + | |
412 | 417 | | |
413 | | - | |
414 | | - | |
| 418 | + | |
| 419 | + | |
415 | 420 | | |
416 | 421 | | |
417 | | - | |
418 | | - | |
| 422 | + | |
| 423 | + | |
| 424 | + | |
419 | 425 | | |
420 | 426 | | |
| 427 | + | |
| 428 | + | |
| 429 | + | |
| 430 | + | |
| 431 | + | |
| 432 | + | |
| 433 | + | |
| 434 | + | |
| 435 | + | |
| 436 | + | |
| 437 | + | |
| 438 | + | |
| 439 | + | |
| 440 | + | |
421 | 441 | | |
422 | 442 | | |
423 | 443 | | |
| |||
0 commit comments