-
Notifications
You must be signed in to change notification settings - Fork 4.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rewrite System.Text.Json stream tests to be async friendly and enable…
… on WASM (#38663) The tests dealing are using a (De)SerializationWrapper so the same code can be used both for String and Stream types. It does that by wrapping the async Stream serialization calls in `Task.Run().GetAwaiter().GetResult()` to turn them into sync calls. However that doesn't work on WebAssembly since we can't wait on tasks as there's only a single thread. To fix this inverse the wrapper so the synchronous String calls are turned into async and use normal awaits for the Stream calls. This allows the test suite to pass on WebAssembly: `Tests run: 8349, Errors: 0, Failures: 0, Skipped: 11. Time: 475.528706s`
- Loading branch information
1 parent
a0987db
commit 95e3dcc
Showing
17 changed files
with
596 additions
and
594 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.