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

Francesco Mari commented on OAK-3862:
-------------------------------------

Summarizing Chetan's proposal, the steps to follow would be:
# Refactor {{FixturesHelper}} to load fixtures using the {{ServiceLoader}}.
# Expose the fixtures on the classpath according to the {{ServiceLoader}} 
mechanism.
# Add a JUnit suite in {{oak-segment}} to list every integration test contained 
in {{oak-core}}.
# Modify every Jenkins build to use Maven's {{----fail-at-end}} option to 
ensure that the whole build doesn't fail at the first error, but runs until the 
end.

Please note that I omitted the use of categories, because inclusion of 
categories in a suite still forces you to list every test class in the the 
suite, according to the 
[documentation|https://github.com/junit-team/junit/wiki/Categories]. Classpath 
scanning doesn't work for category inclusion, see [this 
issue|https://github.com/junit-team/junit/issues/244].

My proposal, instead, would be:
# Add a new {{oak-it}} module.
# Move the tests from the following list to this module.

{noformat}
org.apache.jackrabbit.oak.core.MutableTreeTest
org.apache.jackrabbit.oak.core.RootTest
org.apache.jackrabbit.oak.core.ImmutableRootTest
org.apache.jackrabbit.oak.plugins.name.ReadWriteNamespaceRegistryTest
org.apache.jackrabbit.oak.api.RootTest
org.apache.jackrabbit.oak.plugins.tree.impl.ImmutableTreeTest
org.apache.jackrabbit.oak.plugins.tree.TreeLocationTest
org.apache.jackrabbit.oak.spi.state.NodeBuilderTest
org.apache.jackrabbit.oak.api.TreeTest
org.apache.jackrabbit.oak.api.ContentSessionTest
org.apache.jackrabbit.oak.spi.state.LargeNodeStateTest
org.apache.jackrabbit.oak.spi.state.NodeStateTest
org.apache.jackrabbit.oak.spi.state.CheckpointTest
org.apache.jackrabbit.oak.spi.state.NodeStoreTest
org.apache.jackrabbit.oak.plugins.index.AsyncIndexUpdateLeaseTest
org.apache.jackrabbit.oak.core.RootFuzzIT
{noformat}

In my opinion, the second proposal has a way lower impact than the first.

> Move integration tests in a different Maven module
> --------------------------------------------------
>
>                 Key: OAK-3862
>                 URL: https://issues.apache.org/jira/browse/OAK-3862
>             Project: Jackrabbit Oak
>          Issue Type: Improvement
>            Reporter: Francesco Mari
>            Assignee: Francesco Mari
>             Fix For: 1.4
>
>
> While moving the Segment Store and related packages into its own bundle, I 
> figured out that integration tests contained in {{oak-core}} contribute to a 
> cyclic dependency between the (new) {{oak-segment}} bundle and {{oak-core}}.
> The dependency is due to the usage of {{NodeStoreFixture}} to instantiate 
> different implementations of {{NodeStore}} in a semi-transparent way.
> Tests depending on {{NodeStoreFixture}} are most likely integration tests. A 
> clean solution to this problem would be to move those integration tests into 
> a new Maven module, referencing the API and implementation modules as needed.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to