pmarks opened a new pull request, #625:
URL: https://github.com/apache/arrow-rs-object-store/pull/625

   Proposed fix to #624 - opening for discussion, I'm happy to rework this.
   
   Currently retry and throttle can crash on WASM due to hitting 
std::time::Instant::now(), and MultiPart upload relies on tokio::task::JoinSet, 
which doesn't work on WASM.
   
   TODO: figure out a unit test that actually exercises `RetryableRequest` in 
WASM. Existing tests can run because they need MockServer.
   
   # Which issue does this PR close?
   Closes #624 
   
   # Rationale for this change
    Solidify WASM support by fixing a couple small issues and greatly expanding 
WASM test coverage.
    
   # What changes are included in this PR?
   - Use n0-futures, which re-exports tokio types on native, and supplies 
browser-compatible versions on wasm32.  Used to get a replacement for 
tokio::task::JoinSet, used for MultiPart uploads
   - Use sleep() from gloo-timers on wasm instead of tokio::time::sleep which 
relies on std::Instant::now()
   - To test WASM, we use #[wasm_bindgen_test] instead of #[tokio::test] to 
mark many existing tests.  We can conditionally import the appropriate macro, 
renaming the macro as `async_test` then decorate the tests with #[async_test]. 
These tests will now run under the existing WASM CI.
   
   # Are there any user-facing changes?
   The main Error ennum will change for the WASM build - it will now expose 
`n0_future::task::JoinError` instead of `tokio::task::JoinError` - this is a 
breaking change.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to