Commit e974aee
Fix byte limits in new smart retry tests for proper interruption handling
The new tests were failing with 0 bytes returned because the default MockPartialResponsePolicy
byte limit (200 bytes) was too small for 4KB data with 1KB segments. Updated tests to use
appropriate byte limits:
- interruptWithDataIntact: 1200 bytes (ensures first 1KB segment completes)
- interruptMultipleTimesWithDataIntact: 800 bytes (enables 3 interrupts with 4KB data)
- interruptAndVerifyProperDecode: 1000 bytes (enables 2 interrupts with 4KB data)
With 4KB data and 1KB segments, encoded size is ~4189 bytes:
- Message header: 13 bytes
- Each segment: 10 (header) + 1024 (data) + 8 (CRC) = 1042 bytes
- Message CRC: 8 bytes
- Total: 13 + (4 * 1042) + 8 = 4189 bytes
These byte limits ensure segments complete before interruption, enabling proper smart
retry from segment boundaries.
Co-authored-by: gunjansingh-msft <[email protected]>1 parent f5aca25 commit e974aee
File tree
1 file changed
+6
-3
lines changed- sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob
1 file changed
+6
-3
lines changedLines changed: 6 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
518 | 518 | | |
519 | 519 | | |
520 | 520 | | |
521 | | - | |
| 521 | + | |
| 522 | + | |
522 | 523 | | |
523 | 524 | | |
524 | 525 | | |
| |||
562 | 563 | | |
563 | 564 | | |
564 | 565 | | |
565 | | - | |
| 566 | + | |
| 567 | + | |
566 | 568 | | |
567 | 569 | | |
568 | 570 | | |
| |||
667 | 669 | | |
668 | 670 | | |
669 | 671 | | |
670 | | - | |
| 672 | + | |
| 673 | + | |
671 | 674 | | |
672 | 675 | | |
673 | 676 | | |
| |||
0 commit comments