I have added LeakCanary2 to instrument test by simply adding it to the gradle file.
It works great but it enables LeakCanary for all my tests, which is time consuming. Is there a way that I can only enable LeakCanary for a small set of tests / test classes?
You can use FailAnnotatedTestOnLeakRunListener instead of
FailTestOnLeakRunListener
: