Commit a50b861
fix: use remaining-time-based timeout in polling loops to enforce 10s deadline
The 10s polling deadline in testShouldGetLastSessionId and
testShouldGetSessionMetadataById was not actually enforced because each
iteration could block up to 30s on the Future.get() call. Now each
iteration uses Math.max(1, deadline - currentTimeMillis) as the timeout
so the overall wait is bounded by the intended 10s deadline.
Co-authored-by: edburns <75821+edburns@users.noreply.github.com>1 parent 7f11dcc commit a50b861
1 file changed
Lines changed: 4 additions & 2 deletions
Lines changed: 4 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
769 | 769 | | |
770 | 770 | | |
771 | 771 | | |
772 | | - | |
| 772 | + | |
| 773 | + | |
773 | 774 | | |
774 | 775 | | |
775 | 776 | | |
| |||
861 | 862 | | |
862 | 863 | | |
863 | 864 | | |
864 | | - | |
| 865 | + | |
| 866 | + | |
865 | 867 | | |
866 | 868 | | |
867 | 869 | | |
| |||
0 commit comments