question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Change rethrowAsync()'s behavior in test mode

See original GitHub issue

To follow the conversation here

From a testing point of view, removing rethrowAsync will greatly reduce the amount of flakiness we see. However, is there a valid use case for doing it in the runtime? Why was it added in the first place? Does it prevent the runtime from blocking when it encounters an error, perhaps?

Can we change rethrowAsync to console.error() + reportErrorToServer()

/cc @erwinmombay @jridgewell @dvoytenko @choumx @rsimha

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:8 (8 by maintainers)

github_iconTop GitHub Comments

1reaction
lannkacommented, Jan 15, 2019

SG, let’s go with @dvoytenko’s proposal.

@torch2424 since you will be working on the amp-experiment soon, it will be very important to unmute the tests. Assigning to you.

0reactions
rileyajonescommented, Feb 24, 2021

I can’t seem to reproduce this issue anymore. If anyone thinks this is still happening, please reopen this ticket. @dvoytenko @lannka

Read more comments on GitHub >

github_iconTop Results From Across the Web

How can I unit test this async method which (correctly) throws ...
ThrowAsync <HttpRequestException> (async () => await service. ... You can basically just change the test method declaration by replacing "void" by "async ...
Read more >
async/await .not.toThrow idiomatic check · Issue #1377 - GitHub
when the function is called and returns a promise and it doesn't throw, we should wait for the promise to resolve and then...
Read more >
Exceptions - Fluent Assertions
However, we discovered that testing the exception message for a substring is so common, that we changed the default behavior of WithMessage to...
Read more >
Async Programming - Unit Testing Asynchronous Code
When the unit test method is changed to await the task, the most natural ... [TestMethod] public async Task CorrectlyFailingTest() { await SystemUnderTest....
Read more >
Improving Unit Tests with Fluent Assertions - Code Maze
In this article, we are going to learn how we can improve our unit tests using Fluent Assertions library with .NET project.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found