manifoldcf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kwri...@apache.org
Subject svn commit: r1368398 - /manifoldcf/trunk/tests/webcrawler/src/test/java/org/apache/manifoldcf/webcrawler_tests/MockWebService.java
Date Thu, 02 Aug 2012 09:35:57 GMT
Author: kwright
Date: Thu Aug  2 09:35:57 2012
New Revision: 1368398

URL: http://svn.apache.org/viewvc?rev=1368398&view=rev
Log:
Fix a problem with overgeneration of links in the test

Modified:
    manifoldcf/trunk/tests/webcrawler/src/test/java/org/apache/manifoldcf/webcrawler_tests/MockWebService.java

Modified: manifoldcf/trunk/tests/webcrawler/src/test/java/org/apache/manifoldcf/webcrawler_tests/MockWebService.java
URL: http://svn.apache.org/viewvc/manifoldcf/trunk/tests/webcrawler/src/test/java/org/apache/manifoldcf/webcrawler_tests/MockWebService.java?rev=1368398&r1=1368397&r2=1368398&view=diff
==============================================================================
--- manifoldcf/trunk/tests/webcrawler/src/test/java/org/apache/manifoldcf/webcrawler_tests/MockWebService.java
(original)
+++ manifoldcf/trunk/tests/webcrawler/src/test/java/org/apache/manifoldcf/webcrawler_tests/MockWebService.java
Thu Aug  2 09:35:57 2012
@@ -143,11 +143,10 @@ public class MockWebService
         generateLink(res,site,theLevel+1,docNumber);
       }
       
-      // Generate some cross-links to other items' children
-      for (int i = 0; i < maxDocsThisLevel; i++)
+      // Generate some limited cross-links to other items at this level
+      for (int i = theItem; i < maxDocsThisLevel && i < theItem + docsPerLevel;
i++)
       {
-        int docNumber = theItem + i * docsPerLevel;
-        generateLink(res,site,theLevel+1,docNumber);
+        generateLink(res,site,theLevel,i);
       }
       
       res.getWriter().printf("  </body>\n");



Mime
View raw message