git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [JGIT PATCH 0/4] RepositoryTestCase cleanups
@ 2008-11-27 21:13 Robin Rosenberg
  2008-11-27 21:49 ` Shawn O. Pearce
  0 siblings, 1 reply; 16+ messages in thread
From: Robin Rosenberg @ 2008-11-27 21:13 UTC (permalink / raw)
  To: spearce; +Cc: git, fonseca, Robin Rosenberg

Ok, so here is an attempt to improve the ability of the JGit's unit
tests to delete temporary repositories. This has probably been seen
by many, but Jonas Fonseca raised the issue.

The background is that on Windows you cannot delete files that are
open and mmapped files are open until they get unmapped, which in
Java is beyond explicit programmer control. You can only free the
resources and pray that the GC does the work. Fortunately it usually
does. It turned out our testcases weren't even trying to clean up
properly. 

-- robin

Robin Rosenberg (4):
  Make the cleanup less verbose when it fails to delete temporary
    stuff.
  Add shutdown hooks to try to clean up after unit tests anyway
  Cleanup malformed test cases
  Automatically clean up any repositories created by the test cases

 .../tst/org/spearce/jgit/lib/PackWriterTest.java   |    3 +
 .../org/spearce/jgit/lib/RepositoryTestCase.java   |   82 +++++++++++++++++---
 2 files changed, 73 insertions(+), 12 deletions(-)

^ permalink raw reply	[flat|nested] 16+ messages in thread
* [JGIT PATCH 0/4] RepositoryTestCase cleanups
@ 2008-11-27 21:15 Robin Rosenberg
  0 siblings, 0 replies; 16+ messages in thread
From: Robin Rosenberg @ 2008-11-27 21:15 UTC (permalink / raw)
  To: spearce; +Cc: git, fonseca, Robin Rosenberg

Ok, so here is an attempt to improve the ability of the JGit's unit
tests to delete temporary repositories. This has probably been seen
by many, but Jonas Fonseca raised the issue.

The background is that on Windows you cannot delete files that are
open and mmapped files are open until they get unmapped, which in
Java is beyond explicit programmer control. You can only free the
resources and pray that the GC does the work. Fortunately it usually
does. It turned out our testcases weren't even trying to clean up
properly. 

-- robin

Robin Rosenberg (4):
  Make the cleanup less verbose when it fails to delete temporary
    stuff.
  Add shutdown hooks to try to clean up after unit tests anyway
  Cleanup malformed test cases
  Automatically clean up any repositories created by the test cases

 .../tst/org/spearce/jgit/lib/PackWriterTest.java   |    3 +
 .../org/spearce/jgit/lib/RepositoryTestCase.java   |   82 +++++++++++++++++---
 2 files changed, 73 insertions(+), 12 deletions(-)

^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2008-12-02 16:40 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-11-27 21:13 [JGIT PATCH 0/4] RepositoryTestCase cleanups Robin Rosenberg
2008-11-27 21:49 ` Shawn O. Pearce
2008-11-29 12:01   ` Robin Rosenberg
2008-12-01 23:18     ` Johannes Schindelin
2008-11-30 14:18   ` Robin Rosenberg
2008-11-30 23:40   ` [JGIT PATCH v2 0/8] Unit test cleanups Robin Rosenberg
2008-11-30 23:40     ` [JGIT PATCH 1/8] Drop unneeded code in unit tests Robin Rosenberg
2008-11-30 23:40       ` [JGIT PATCH 2/8] Cleanup malformed test cases Robin Rosenberg
2008-11-30 23:40         ` [JGIT PATCH 3/8] Turn off memory mapping in JGit unit tests by default Robin Rosenberg
2008-11-30 23:40           ` [JGIT PATCH 4/8] Add a counter to make sure the test repo name is unique Robin Rosenberg
2008-11-30 23:40             ` [JGIT PATCH 5/8] Make the cleanup less verbose when it fails to delete temporary stuff Robin Rosenberg
2008-11-30 23:40               ` [JGIT PATCH 6/8] Cleanup after each test Robin Rosenberg
2008-11-30 23:40                 ` [JGIT PATCH 7/8] Close files opened by unit testing framework Robin Rosenberg
2008-11-30 23:40                   ` [JGIT PATCH 8/8] Hard failure on unit test cleanups if they fail Robin Rosenberg
2008-12-02 16:38     ` [JGIT PATCH v2 0/8] Unit test cleanups Shawn O. Pearce
  -- strict thread matches above, loose matches on Subject: below --
2008-11-27 21:15 [JGIT PATCH 0/4] RepositoryTestCase cleanups Robin Rosenberg

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).