-
-
Notifications
You must be signed in to change notification settings - Fork 21
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
Logging in recursive function leads to display issue #53
Comments
Coming back up for air after a recent job change and trying to spin back up here. I recreated this bug in our Web UI, but when I run the same solution locally, all of the logs in the order that I would expect given that we are only running a single test runner. My hypothesis is that the Exercism web UI is guessing which log goes with which test case based on time stamps, but that buffered I/O on stdout is causing some logs to flush while the test runner is between tests. I assume that these tests somehow end up getting associated with the last test by default. @ErikSchierboom - Have you seen this behavior on other tracks? I would assume that one solution would be to change default logging to stderr (which is not buffered typically). It seems that the Jest Test runner itself is writing to stderr, so that probably makes the most sense. It probably makes sense to try to see what changes after updating the JS dependencies as well. |
Not that I know of. We're not really doing anything with capturing output, as that is the responsibility of the test runner. |
Sorry, I don't understand the bug 🙈. If someone can explain it, I can probably let you know how or what. @bushidocodes jest always buffers, unless you tell it not to. When I updated the JS test runner to the newest jest, I had to change the bash call too to make it not buffer weirdly. |
It has been some time, let me double-check if the problem still exists. |
@SleeplessByte - Basically, |
Hi,
during the development of the solution for the
reverse-string
exercise, I noticed that the logs which were printed from within a recursive function did not end up under the right test case in the UI.I was printing the remaining bytes of the string to see if the recursive function has the right start and end points for the string. The problem appears especially in the later test cases, like in the picture attached.
The text was updated successfully, but these errors were encountered: