clear the history store at the beginning of testBasics(), because the other test might have run first

This commit is contained in:
Noah Levitt
2016-06-07 14:12:20 -05:00
parent b09b078075
commit cf9498d2ed
@@ -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, "<urn:uuid:f00dface-d00d-d00d-d00d-0beefface0ff>");