git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[JGIT PATCH 0/4] RepositoryTestCase cleanups

From
Robin Rosenberg <robin.rosenberg@dewire.com>
Date
Nov 27, 2008, 21:15 UTC
Message-ID
<1227820535-9785-1-git-send-email-robin.rosenberg@dewire.com>

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(-)
Next: Robin Rosenberg
Message 1 of 5 in “RepositoryTestCase cleanups”
  1. 0/4 RepositoryTestCase cleanupsRobin Rosenberg, Nov 27, 2008
  2. 1/4 Make the cleanup less verbose when it fails to delete temporary stuff.Robin Rosenberg, Nov 27, 2008
  3. 2/4 Add shutdown hooks to try to clean up after unit tests anywayRobin Rosenberg, Nov 27, 2008
  4. 3/4 Cleanup malformed test casesRobin Rosenberg, Nov 27, 2008
  5. 4/4 Automatically clean up any repositories created by the test casesRobin Rosenberg, Nov 27, 2008

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.