Hande Celikkanat created NUTCH-3233:
---------------------------------------

             Summary: 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


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