It is admittedly my fault that I have written a test where I did not use the return value of Eventually to make an assertion. But being human, errors happen. Trying to support humans, and considering that the functions passed to Eventually or Consistently are not even called if they don't have an assertion, why not make it fail in that case? Or at least show a warning.
I'm proposing to make
Eventually(func() error {
return libraryClient.Connect(ctx)
}).WithContext(ctx)
throw an error or print a warning to make it clear that it isn't even called without an accompanying assertion.
It is admittedly my fault that I have written a test where I did not use the return value of
Eventuallyto make an assertion. But being human, errors happen. Trying to support humans, and considering that the functions passed toEventuallyorConsistentlyare not even called if they don't have an assertion, why not make it fail in that case? Or at least show a warning.I'm proposing to make
throw an error or print a warning to make it clear that it isn't even called without an accompanying assertion.