TestCase.tearDown() is not called if setUp raises exception,
but we have to close backend and release lock before executing
other tests. The easiest way to do it is to use addCleanup
instead of tearDown for freeing resources.
Change-Id: I885bb7d491f4b3ee06a351f5d22087e23804e19b