nutch-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sebastian Nagel (JIRA)" <>
Subject [jira] [Commented] (NUTCH-1645) Junit Test Case for Adaptive Fetch Schedule class
Date Sun, 26 Jan 2014 21:44:38 GMT


Sebastian Nagel commented on NUTCH-1645:

Ok, the core functionality of AdaptiveFetchSchedule is tested: when a page is re-fetched (1)
increase the fetch interval if a page is found not modified (2) decrease it if the page has
changed. To catch NUTCH-1564 by simulating many iterations of re-fetches would be nice (but
maybe this could be also included into NUTCH-1502). The patch looks indeed much cleaner. Thanks!
Some trivial improvements which could be made:
* comments/javadoc which explain what is tested are always useful
* instead of {{changed = 1}} a {{changed = FetchSchedule.STATUS_MODIFIED}} etc. would be more
explicit and also explains which case is tested next
* both assertNotNull checks are redundant:
** never fails because calling {{setConf(conf)}} does the check implicitly (would throw a
** {{prepareWebpage()}} belongs to the test unit (needs not to be tested and a null-WebPage
would cause the test to fail anyway):
    WebPage p = prepareWebpage();
* {{testValues(...)}} resets the fetch interval of the WebPage: a method called "testValues"
is not really expected to change the state of any of the passed values

> Junit Test Case for Adaptive Fetch Schedule class
> -------------------------------------------------
>                 Key: NUTCH-1645
>                 URL:
>             Project: Nutch
>          Issue Type: Test
>    Affects Versions: 2.2.1
>            Reporter: Talat UYARER
>            Priority: Minor
>             Fix For: 2.3
>         Attachments: NUTCH-1645-v2.patch, NUTCH-1645-v3.patch, NUTCH-1645-v4.patch, NUTCH-1645.patch
> Currently there is not Test Case for Adaptive Fetch Schedule. Junit test Writes for its.

This message was sent by Atlassian JIRA

View raw message