On Sat, Sep 8, 2012 at 8:51 AM, Dawid Weiss <[email protected]> wrote: >> I don’t understand the stack trace, so I have no idea. Test looks OK. > > There is an infrastructural support for adding "close resource after > all the hooks and everything" thingies. It's called closeAfterTest and > closeAfterSuite (methods on LuceneTestCase). This was meant to be an > easy facility to close/ remove resources; much like a finally but for > tests and suites. If such a resource throws an exception on close the > stack trace tells you why it failed to close but also where it was > "registered" for closing which should help you find out the code > fragment that was responsible for the resource. So:
I think this is helpful. separately the fact that each method in this test names the directory after the test method that opened it made it really easy to determine where the issue was. I'm not sure how consistent we are with this in e.g. LuceneTestCase.newDirectory/_TestUtil.getTempDir & co in general. if we can sneak the test method name (or beforeClass, or whatever is appropriate, whatever we can do) always into the randomly-created directories it could help debugging. Maybe we already do this today, I'm not sure. -- lucidworks.com --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
