cancel
Showing results for 
Search instead for 
Did you mean: 

[Feature] Require a specific repository in CoreFeature

Florent_M
Champ in-the-making
Champ in-the-making

Hello,

Someone might need to run a test on a specific repository, for example when queries are executed using MongoClient. Otherwise the test should be ignored.

Proposal : add a "require" attribute to @RepositoryConfig.

@RepositoryConfig(require = StorageConfiguration.CORE_MONGODB)

Using a MongoDB core the test would run as expected, otherwise it would be ignored.

1 ACCEPTED ANSWER

Florent_Guillau
World-Class Innovator
World-Class Innovator

For this you can use a simple @Before that checks assumeTrue(coreFeature.getStorageConfiguration().isDBSMongoDB()), no need for extra changes to @RepositoryConfig

View answer in original post

3 REPLIES 3

Florent_M
Champ in-the-making
Champ in-the-making

BTW I cannot create a NXP for the PR, but the commit is ready.

Florent_Guillau
World-Class Innovator
World-Class Innovator

For this you can use a simple @Before that checks assumeTrue(coreFeature.getStorageConfiguration().isDBSMongoDB()), no need for extra changes to @RepositoryConfig

The idea was to avoid the Nuxeo startup whenever possible. But ok.