Merge pull request #21238 from Snuffleupagus/PDFDataRangeTransport-unittest-faster

Make the `PDFDataRangeTransport` streaming unit-tests faster
This commit is contained in:
Tim van der Meij 2026-05-10 14:11:09 +02:00 committed by GitHub
commit 33a6f3e206
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -5207,7 +5207,7 @@ have written that much by now. So, heres to squashing bugs.`);
describe("PDFDataRangeTransport", function () {
async function streamDelay() {
return new Promise(resolve => {
setTimeout(resolve, 250);
setTimeout(resolve, 100);
});
}
let dataPromise;
@ -5269,7 +5269,7 @@ have written that much by now. So, heres to squashing bugs.`);
expect(contentDispositionFilename).toEqual("aaa.pdf");
expect(contentLength).toEqual(dataLength);
expect(fetches).toBeGreaterThan(4);
expect(fetches).toEqual(5);
expect(initialProgress).toEqual({
loaded: initialDataLength,
@ -5428,7 +5428,7 @@ have written that much by now. So, heres to squashing bugs.`);
expect(contentDispositionFilename).toEqual(null);
expect(contentLength).toEqual(dataLength);
expect(fetches).toBeGreaterThan(2);
expect(fetches).toEqual(3);
expect(initialProgress.loaded).toBeGreaterThan(initialDataLength);
expect(initialProgress.total).toEqual(dataLength);