[ 
https://issues.apache.org/jira/browse/NUTCH-3233?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18135909#comment-18135909
 ] 

ASF GitHub Bot commented on NUTCH-3233:
---------------------------------------

handecelikkanat opened a new pull request, #987:
URL: https://github.com/apache/nutch/pull/987

   Add the runtime dependencies of Testcontainers (docker-java*, duct-tape*,
   jna*) to the global test dependencies in src/plugin/build-plugin.xml, so the
   Testcontainers-based protocol integration tests run instead of being skipped.
   See https://issues.apache.org/jira/browse/NUTCH-3233.
   
   With this change, locally with Docker running:
   - HttpProtocolIT: 3 tests, 0 failures
   - OkHttpProtocolIT: 3 tests, 0 failures
   - HtmlUnitProtocolIT: 3 tests, 1 failure (testFetchReturnsContent), reported
     as https://issues.apache.org/jira/browse/NUTCH-3234
   - SeleniumProtocolIT: 3 tests, 3 failures, reported as
     https://issues.apache.org/jira/browse/NUTCH-3235
   
   I left both tests unchanged. Once this PR is merged, PRs touching protocol 
plugins
   will fail these tests until NUTCH-3234 and NUTCH-3235 are fixed or the tests 
are
   disabled.
   
   Unit tests (ant clean runtime test) pass.




> Testcontainers protocol integration tests are skipped because Testcontainers' 
> dependencies are missing from the plugin test classpath
> -------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: NUTCH-3233
>                 URL: https://issues.apache.org/jira/browse/NUTCH-3233
>             Project: Nutch
>          Issue Type: Bug
>          Components: build
>    Affects Versions: 1.23
>            Reporter: Hande Celikkanat
>            Priority: Major
>
> The protocol plugin integration tests that use Testcontainers (HttpProtocolIT,
> HtmlUnitProtocolIT, OkHttpProtocolIT, SeleniumProtocolIT, added in NUTCH-3175)
> are skipped even when Docker is available, for example:
> {noformat}
> ant test-protocol-integration
> ...
>      [echo] Running protocol integration tests for plugin: protocol-selenium
> [junitlauncher] Tests run: 0, Failures: 0, Aborted: 0, Skipped: 3, Time 
> elapsed: 0.111 sec
> {noformat}
> test.classpath in src/plugin/build-plugin.xml includes only 
> testcontainers*.jar
> from build/test/lib, not the runtime dependencies of Testcontainers
> (docker-java-api, docker-java-transport, docker-java-transport-zerodep,
> duct-tape, jna). Testcontainers cannot load its Docker client, and its JUnit
> extension (@Testcontainers(disabledWithoutDocker = true)) treats that as "no
> Docker available" and skips the tests. The indexer plugins should not be
> affected, because they declare Testcontainers modules in their own ivy.xml,
> which brings these dependencies into the plugin's test lib.
> Adding include patterns for docker-java*.jar, duct-tape*.jar and jna*.jar 
> makes
> the tests run. These cover the declared runtime dependencies of Testcontainers
> 2.0.5 and docker-java-transport-zerodep 3.7.1. slf4j-api and commons-compress
> are already on the classpath via build/lib, and jib-core is a provided
> dependency.
> With the tests enabled, HtmlUnitProtocolIT.testFetchReturnsContent fails:
> getProtocolOutput returns no content for a live nginx page. This needs a look
> before or together with this fix.



--
This message was sent by Atlassian Jira
(v10.3.26#10030026)

Reply via email to