Extend timeout and remember to close everything in each test case.

Should fix tests on android.