Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [rdf4j-dev] Tests for RepositoryFederatedService

If they are unit tests, I would just add them to the same module that RepositoryFederatedService lives in, that is: rdf4j-repository-sparql. If you need additional dependencies, you will need to make sure they don't introduce cyclic dependencies in the maven reactor. If at all possible, using mocking/stubbing where possible to reduce the need for loads of additional dependencies. We use Mockito (https://site.mockito.org/) as our mocking framework. 

If you can't get away with mocking, and do need dependencies that cause cycles, then it's better to add the tests to rdf4j-repository-compliance instead. There's no easy way around the fact that these tests are bit harder to execute ad-hoc (although it is currently extra difficult because the compliance modules not in the standard maven build profile - I intend to change that though).

Cheers,

Jeen

On Mon, Dec 30, 2019 at 9:05 AM Andreas Schwarte <aschwarte10@xxxxxxxxx> wrote:
Hi,

while doing some validation / experiments on federation setups, I may have stumbled into a bug in the RepositoryFederatedService.

My plan would be to write a good set of unit tests to provide a better understanding first for myself, and then as a basis for discussion.

The question I have to you: what would be the best project / module to write the tests? I am asking because I would require quite a few dependencies (even at compile time):

- SailRepository
- MemoryStore
- Sparql module for Federation
- Utility and base modules (RIO, Model, ...)

I though about using "rdf4j-repository-compliance", but here I am lacking SailRepository and MemoryStore dependencies (at least on compile level). Also it is not very easy to execute the tests ad-hoc.

Any proposals where to best place the tests? Do you see problems when we add additional compile dependencies to "rdf4j-repository-compliance"?

Any hints highly appreciated.

Best,
 Andreas
_______________________________________________
rdf4j-dev mailing list
rdf4j-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://www.eclipse.org/mailman/listinfo/rdf4j-dev

Back to the top