-
-
Notifications
You must be signed in to change notification settings - Fork 288
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
async: provide information when starting to wait #720
Comments
I'm aware that Gomega usually cannot log anything when using the global instance (= For integration with Ginkgo, the progress reporting API could be extended. |
hey @pohly - i want to get a clarification first. is the problem you are trying to solve “i want additional information in the logs for the test so that i can go back after the test later and understand what happened/why” or is it “i am actively running a test and waiting for it to complete but it is stuck doing something and i’m not sure what so would like to know.” if it’s the latter then you can, today, send setting that aside. we can stick with I could imagine providing a global override Those are some ideas - but let me know if |
It is primarily “I am actively running a test". I know that I can send SIGINFO, but that produces more information than I need. My main motivation is "tell me immediately when it gets stuck and on what". Having said that, perhaps SIGINFO is good enough. If I let something run for 30 seconds and it's not complete, then I pretty much can be sure that it is currently polling. Chances are good that I get a report for something that blocks long and not for something that is quick. But I also see value for running tests in the CI. Some tests are slow and its not obvious why unless one liberally adds |
Problem
While debugging a test which uses Eventually and Consistently, I want to know what the test is currently doing. With Kubernetes, I might run "kubectl" in parallel to the running test check some additional things. I run
ginkgo -v -focus=<the test>
.Option 1
Manually add log output before each Eventually and Consistently:
Downsides:
Option 2
Use
--progress-poll-interval=<some low value>
.Downsides:
Option 3
Run under a debugger.
Downsides:
Proposal
The first time that polling fails in Eventually (whether it's due to an error or the matcher), some message could be logged about it:
Let's keep the tone neutral. This is not an error or failure, therefore "did not succeed" instead of "failed". The practical difference is that the test log viewer in Kubernetes might match the "failed" and emphasize it unnecessarily.
Let's not dump too much of the usual failure. That could be very long. It might also work to not dump the check result when there is a description and only fall back to that when there isn't.
With Consistently it's simpler, as long as
Should
has an additional description:Without description it's less informative because there is no information from the matcher.
The text was updated successfully, but these errors were encountered: