From a7b7c6cf5a0d567dad91fd6c499279cde2004508 Mon Sep 17 00:00:00 2001 From: Kenji Nagahashi Date: Fri, 8 Dec 2017 17:15:03 -0800 Subject: [PATCH] fix for test failures in a workspace on NFS-mounted filesystem ContentDigestHistoryTest does not close BdbModule. It results in failure to delete bdb directory in following tests. Added tearDown() method that closes BdbModule. --- .../archive/modules/recrawl/ContentDigestHistoryTest.java | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/modules/src/test/java/org/archive/modules/recrawl/ContentDigestHistoryTest.java b/modules/src/test/java/org/archive/modules/recrawl/ContentDigestHistoryTest.java index cd007b74..ea2980e0 100644 --- a/modules/src/test/java/org/archive/modules/recrawl/ContentDigestHistoryTest.java +++ b/modules/src/test/java/org/archive/modules/recrawl/ContentDigestHistoryTest.java @@ -128,6 +128,14 @@ public class ContentDigestHistoryTest extends TmpDirTestCase { return bdb; } + @Override + protected void tearDown() throws Exception { + if (bdb != null) { + bdb.close(); + } + super.tearDown(); + } + public void testBasics() throws InterruptedException, IOException { historyStore().store.clear(); assertTrue(historyStore().store.isEmpty());