Repository navigation
Conversation
drzraf
commented
Oct 5, 2021
- Remove the distinction between sync/async readFileFn in order to use a unified codepath.
- Remove the need for calling the preprocessFinished() function after defining a (now async) preprocess() callback.
|
Tests are failing, this is related to the fact that once a queue is initialized, it relies upon recursion (so that xhr.load event handler calls the The problem with this is that while event handlers used to be synchronous... they now triggers async' function calls without returning the corresponding Promise to upper levels. |
|
I'm pretty sure I'd have to rewrite |
|
Next problem is that XHR But the problem with
We definitely don't want to hold v3 until major browsers supports fetch upload Stream out of the box. But I think v3 uploads are not correct until and revamp of the recursion (regarding |
|
I agree that there is room for improvement in I'm not sure though, if the synchronous upload tests will ever work with Perhaps the networking related tests should be rewritten with events ( |
|
Regarding |
unified codepath. - Remove the need for calling the preprocessFinished() function after defining a (now async) preprocess() callback.
398b264 to
3388ab4
Compare
|
@drzraf looks good, if you want, you can merge this. But please update the docs accordingly |
A stateful reader (GPG packetizer, stream cipher, ...) has already consumed the bytes when readFileFn resolves. Discarding a completed read because a pause/cancel/error raced with it corrupts the stream on resume. Cache the payload and checksum before the session decides whether to upload it. Skip the reader entirely when the signal was already aborted before the read starts. Add a stateful-pause regression asserting the produced ciphertext is reused and the reader is not called again for the same chunk. Refs: flowjs#368
- Add target-API regressions for empty async-read files (flowjs#375), pause/cancel across an async read (flowjs#368), concurrency, completion semantics, stateful-read caching and payload integrity. - Add upload/error edge cases, transport load/error/timeout/abort, test-request success/404/retry, EOF/null/ArrayBuffer/string readers, read errors, raw-data transforms, checksum caching, duplicate batch filtering, retry reset, priority scheduling, browse/drop, hooks, session guards and real HTTP upload/retry tests. - Add a dedicated streaming suite for unknown, underestimated and overestimated sizes, dynamic chunks, EOF markers, marker retries, read errors, pause/resume, Blob-backed empty-slice EOF and bounded payload memory. - Add seeded randomized stress with one spec per seed, fresh scope per seed, a stall diagnostic, and waitFor() failures that throw instead of silently continuing. This makes a timed-out seed report its state rather than turning into an opaque Jasmine timeout. - Drive the suite with Playwright across Chromium, Firefox and WebKit; keep a chromium-cdp mode that attaches to an existing Chromium without closing it. - Add Istanbul instrumentation and merged coverage reporting. Chromium: 97.4% statements, 86.7% branches, 98.0% functions, 97.6% lines over 145 specs. CI runs the full browser matrix. - Update CI to install Playwright browsers, run the matrix and upload coverage. Refs: flowjs#319, flowjs#353, flowjs#368, flowjs#375