git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Robin Rosenberg <robin.rosenberg@dewire.com>
To: spearce@spearce.org
Cc: git@vger.kernel.org, fonseca@diku.dk,
	Robin Rosenberg <robin.rosenberg@dewire.com>
Subject: [JGIT PATCH 0/4] RepositoryTestCase cleanups
Date: Thu, 27 Nov 2008 22:15:31 +0100	[thread overview]
Message-ID: <1227820535-9785-1-git-send-email-robin.rosenberg@dewire.com> (raw)

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(-)

             reply	other threads:[~2008-11-27 21:16 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-11-27 21:15 Robin Rosenberg [this message]
2008-11-27 21:15 ` [JGIT PATCH 1/4] Make the cleanup less verbose when it fails to delete temporary stuff Robin Rosenberg
2008-11-27 21:15   ` [JGIT PATCH 2/4] Add shutdown hooks to try to clean up after unit tests anyway Robin Rosenberg
2008-11-27 21:15     ` [JGIT PATCH 3/4] Cleanup malformed test cases Robin Rosenberg
2008-11-27 21:15       ` [JGIT PATCH 4/4] Automatically clean up any repositories created by the " Robin Rosenberg
  -- strict thread matches above, loose matches on Subject: below --
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1227820535-9785-1-git-send-email-robin.rosenberg@dewire.com \
    --to=robin.rosenberg@dewire.com \
    --cc=fonseca@diku.dk \
    --cc=git@vger.kernel.org \
    --cc=spearce@spearce.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).