Skip to content
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

Excessive printing by eftest.report.progress/report on :pass #94

Open
p-himik opened this issue Jul 19, 2024 · 0 comments
Open

Excessive printing by eftest.report.progress/report on :pass #94

p-himik opened this issue Jul 19, 2024 · 0 comments

Comments

@p-himik
Copy link

p-himik commented Jul 19, 2024

Just spent half a day chasing an intermittent issue where running a bunch of quick tests with 30k assertions would sometimes result in the behavior on the recording below. It would last for at least multiple minutes, whereas a normal run would take 20 seconds.

Screencast.2024-07-18.23.47.43.mp4

After experimenting with multiple changes to the code, debugging things, changing reporters, changing terminals and shells used to run the tests, I'm now 90% certain that the culprit is some rendering-related system on my end. Maybe it's the GPU driver, maybe it's the hardware, maybe X11, maybe something else.

But the issue goes away if I make this small addition to my code:

(let [orig-report (get-method eftest.report.progress/report :pass)]
  (defmethod eftest.report.progress/report :pass [m]
    (binding [clojure.test/*test-out* (java.io.StringWriter.)]
      (orig-report m))))

As a bonus, the tests now run 1-2 s faster.
Visually, there are no changes at all since the report of :pass doesn't add any new information anyway - all the information is already printed by :begin-test-run and :end-test-var.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant