Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [egit-dev] SWTBot tests

A memory profiler helped :).

within the tests, org.eclipse.egit.ui.view.repositories.GitRepositoriesViewRepoHandlingTest.testSearchDirectoryWithBareRepos() tries to delete the test directory, directory that contains the test repositories in the user home. This recursively deletes all files it can find. Deep down, there is a pack file that needs to be deleted.

This pack file is held open by org.eclipse.jgit.internal.storage.file.WindowCache . A savage hack to close() and removeAll(PackFile) on that particular file before the call to "delete" allows the tests to pass.

I do not know these parts of JGit enough to really know what to do from there. Any suggestion on how to properly clear the repository?

Laurent

On 21/03/2013 10:56, Laurent Goubet wrote:
I can't say "always the same" for sure, but since I have from 70 to 90 failures every run, some are failing every time, yes :).

I am currently trying to figure out how I could detect the leak, but lack the tools. Currently trying out with a memory profiler if there are suspicious input/output streams on that file.

Laurent

On 21/03/2013 10:35, Alex Blewitt wrote:
On 21 Mar 2013, at 09:03, Laurent Goubet wrote:

I usually end up with a lot of errors, most of them because JGit/EGit does not manage to remove some of the files from its test repositories. Disabling my anti-virus does not help. My latest run ended up in 79 errors and 1 failure, and left the following files on my fs :
Unlike Linux, Windows doesn't let you delete a file if something else has it open for read. It's possible that these tests are exposing a file handle leak which would not manifest itself on Linux or MacOSX.

Is it the same tests that are failing each time?

Alex



_______________________________________________
egit-dev mailing list
egit-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/egit-dev

begin:vcard
fn:Laurent Goubet
n:Goubet;Laurent
org:<a href="http://www.obeo.fr";>Obeo</a>
email;internet:laurent.goubet@xxxxxxx
url:http://www.obeo.fr
version:2.1
end:vcard


Back to the top