From cf9498d2ededdc48e2a6364efb51081d2f312c1c Mon Sep 17 00:00:00 2001 From: Noah Levitt Date: Tue, 7 Jun 2016 14:12:20 -0500 Subject: [PATCH] clear the history store at the beginning of testBasics(), because the other test might have run first --- .../archive/modules/recrawl/ContentDigestHistoryTest.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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 5b1acff1..cd007b74 100644 --- a/modules/src/test/java/org/archive/modules/recrawl/ContentDigestHistoryTest.java +++ b/modules/src/test/java/org/archive/modules/recrawl/ContentDigestHistoryTest.java @@ -129,6 +129,9 @@ public class ContentDigestHistoryTest extends TmpDirTestCase { } public void testBasics() throws InterruptedException, IOException { + historyStore().store.clear(); + assertTrue(historyStore().store.isEmpty()); + CrawlURI curi1 = new CrawlURI(UURIFactory.getInstance("http://example.org/1")); // without Recorder, CrawlURI#getContentLength() returns zero, which makes // loader().shoudProcess() return false. @@ -158,7 +161,8 @@ public class ContentDigestHistoryTest extends TmpDirTestCase { assertTrue(curi1.getContentDigestHistory().isEmpty()); storer().process(curi1); - assertTrue(historyStore().store.isEmpty()); + assertTrue("historyStore().store should be empty, but it is: " + historyStore().store, + historyStore().store.isEmpty()); curi1.getContentDigestHistory().put(A_ORIGINAL_URL, "http://example.org/original"); // curi1.getContentDigestHistory().put(A_WARC_RECORD_ID, "");