AsifQureshi04 opened a new pull request, #2005:
URL: https://github.com/apache/stormcrawler/pull/2005

   ## Summary
   
   Fixes #304.
   
   The `SubDocumentsFilterTest` was using a sitemap XML file 
(`stormcrawler.sitemap.xml`) as test input for `JSoupParserBolt`, which is an 
HTML parser. This only worked because MIME type detection was disabled — a 
fragile workaround.
   
   **Changes:**
   - Created a minimal HTML test document (`subdocuments.html`) with 6 anchor 
links
   - Rewrote `SubDocumentsParseFilter` to extract links from the W3C DOM 
(`DocumentFragment`) instead of re-parsing raw bytes as XML with XPath
   - Removed the `detect.mimetype = false` hack from the test
   
   ## Test plan
   
   - [x] `SubDocumentsFilterTest` passes (7 emitted tuples: 6 subdocuments + 1 
parent)
   - [x] All other parse filter tests pass (`XPathFilterTest`, 
`CollectionTaggerTest`, `CSVMetadataFilterTest`)
   - [x] Code formatted with `mvn git-code-format:format-code`


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to