Commit 9c2c27c
authored
🤖 fix: reduce flakiness in anthropic1MContext test (#1057)
Token limit errors fail immediately - the API rejects the request before
streaming starts. Instead of waiting for full response completion, we
now race between `stream-start` (accepted) vs `stream-error` (rejected).
## Changes
- Simplified test to check `stream-start` vs `stream-error` (not
`stream-end`)
- Reduced timeout from 60s to 30s
- Extracted `buildAnthropicHeaders()` into testable pure function
- Added unit tests for header building logic
_Generated with `mux`_1 parent 5111e24 commit 9c2c27c
File tree
3 files changed
+66
-124
lines changed- src/node/services
- tests/ipc
3 files changed
+66
-124
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
6 | | - | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
7 | 12 | | |
8 | 13 | | |
9 | 14 | | |
| |||
76 | 81 | | |
77 | 82 | | |
78 | 83 | | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
214 | 214 | | |
215 | 215 | | |
216 | 216 | | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
217 | 237 | | |
218 | 238 | | |
219 | 239 | | |
| |||
447 | 467 | | |
448 | 468 | | |
449 | 469 | | |
450 | | - | |
451 | | - | |
452 | | - | |
453 | | - | |
454 | | - | |
455 | | - | |
456 | | - | |
457 | | - | |
| 470 | + | |
| 471 | + | |
| 472 | + | |
| 473 | + | |
458 | 474 | | |
459 | 475 | | |
460 | 476 | | |
| |||
This file was deleted.
0 commit comments