From 65a10774258232e82518ff7b2f3040dac90ff3cd Mon Sep 17 00:00:00 2001 From: Noah Levitt Date: Tue, 12 Jan 2016 14:59:45 -0800 Subject: [PATCH] license header --- .../crawler/selftest/StatisticsSelfTest.java | 24 ++++++++++++++++--- 1 file changed, 21 insertions(+), 3 deletions(-) diff --git a/engine/src/test/java/org/archive/crawler/selftest/StatisticsSelfTest.java b/engine/src/test/java/org/archive/crawler/selftest/StatisticsSelfTest.java index 3eb97acc..e5dde039 100644 --- a/engine/src/test/java/org/archive/crawler/selftest/StatisticsSelfTest.java +++ b/engine/src/test/java/org/archive/crawler/selftest/StatisticsSelfTest.java @@ -1,3 +1,21 @@ +/* + * This file is part of the Heritrix web crawler (crawler.archive.org). + * + * Licensed to the Internet Archive (IA) by one or more individual + * contributors. + * + * The IA licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package org.archive.crawler.selftest; import org.archive.crawler.reporting.StatisticsTracker; @@ -12,12 +30,12 @@ public class StatisticsSelfTest extends SelfTestBase { // non-deterministic return "http://127.0.0.1:7777/a.html\\nhttp://localhost:7777/b.html"; } - + @Override protected void verify() throws Exception { verifySourceStats(); } - + protected void verifySourceStats() throws Exception { StatisticsTracker stats = heritrix.getEngine().getJob("selftest-job").getCrawlController().getStatisticsTracker(); assertNotNull(stats); @@ -29,7 +47,7 @@ public class StatisticsSelfTest extends SelfTestBase { assertEquals(2, sourceStats.keySet().size()); assertEquals(2942l, (long) sourceStats.get("novel")); assertEquals(3l, (long) sourceStats.get("novelCount")); - + sourceStats = stats.getSourceStats("http://localhost:7777/b.html"); assertNotNull(sourceStats); assertEquals(2, sourceStats.keySet().size());