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

Michael Semb Wever commented on CASSANDRA-16704:
------------------------------------------------

bq. My thinking is that such dependencies should then become explicit test 
dependencies…

They are in places, see all those marked as "provided" or "optional" 
[here|https://github.com/apache/cassandra/blob/cassandra-4.0-rc1/build.xml#L491-L657]
 and 
[here|https://github.com/apache/cassandra/blob/cassandra-4.0-rc1/build.xml#L749-L833].

Note, these do also include those dependencies needed solely for the sake of 
compiling.

bq. …rather than allowing transitive dependencies (which may disappear or 
change version when any other dependency is updated) to creep into the tests.

The {{lib/}} folder also contains transitive dependencies, just of the more 
restricted scope.

> Fix imports; run tests with packaged dependencies
> -------------------------------------------------
>
>                 Key: CASSANDRA-16704
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-16704
>             Project: Cassandra
>          Issue Type: Bug
>          Components: Build, Test/burn, Test/unit
>            Reporter: Angelo Polo
>            Assignee: Angelo Polo
>            Priority: Normal
>             Fix For: 4.0.x, 4.x
>
>         Attachments: test-with-runtime-deps.patch
>
>
> Tests are currently run with a classpath containing _all_ downloaded jars. 
> The tests would be more reflective of the behavior of a runtime environment 
> if the test classpath only contained jars that are bundled with the binary 
> release, together with explicit test dependencies. Ideally we'd use the 
> build/lib/ jars for the classpath since that's what gets packaged, but since 
> these aren't available at test compile time and should be identical to lib/ 
> anyway, I've used the later.
> Doing so exposed a couple of references in src/java to 
> "org.apache.commons.lang", which is not available at runtime (should be 
> "org.apache.commons.lang*3*").
> Attached patch modifies the test classpath, fixes various imports in both 
> test/ and src/ classes, and makes some simple substitutions in the tests such 
> as using AbstractMap.SimpleEntry in place of 
> org.apache.commons.collections.keyvalue.AbstractMapEntry.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to