Fork me on GitHub
#kaocha
<
2020-12-02
>
plexus06:12:34

Are you on the latest version? Using short names for built-in plugins is supposed to work.

andrea.crotti15:12:08

@plexus I tried a few more attempts to retry failed tests (and moved it to a different project entirely), but I can't find a way to actually make it work properly https://github.com/AndreaCrotti/kaocha-retry/blob/main/src/kaocha/plugin/retry.clj

andrea.crotti15:12:27

the retrying in general happens but then the reporting is still messed up

andrea.crotti15:12:54

maybe I just have to do it outside of kaocha like it was currently done with lein test, recording the failed tests and re-running them

andrea.crotti15:12:52

starting to suspect that with a plugin I won't really get it working

plexus15:12:55

I'm pretty sure you can do this with a plugin.

plexus15:12:47

rebind the reporter in wrap-run to capture events until you know if you want a test to pass or fail

plexus15:12:35

(with-redefs [t/report (fn [e] (swap! recorded-events conj e))]
  (apply run args))

plexus15:12:54

then replay them for the final run of a test

plexus15:12:07

(run! t/report @recorded-events)

andrea.crotti15:12:32

ah nice didn't think about that, with-redefsis a bit o a nuclear option though

andrea.crotti15:12:43

but if there is no other way it's fine I guess

plexus15:12:59

but make sure your special handling in wrap-run only kicks in for leaf tests

plexus15:12:13

t/report is meant to be rebound like that, that's what kaocha also does

andrea.crotti15:12:32

ah ok cool, and yeah I saw the issue with leafs and non leafs tests

andrea.crotti15:12:43

ok thanks I can try that then