Hello,

On 21/03/2023 20:55, Wojtek wrote:
Hi

On 20/03/2023 19:40, Benoit TELLIER wrote:
On 20/03/2023 23:03, Wojtek wrote:
For example in module `server/protocols/jmap-rfc-8621-integration-tests/jmap-rfc-8621-integration-tests-common` (server/protocols/jmap-rfc-8621-integration-tests/jmap-rfc-8621-integration-tests-common/src/main/scala/org/apache/james/jmap/rfc8621/contract) or module `mpt/impl/imap-mailbox/core` (https://github.com/apache/james-project/blob/master/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/Condstore.java)

Searching for `@Test` in IDEA gives ~1,5k results in production (i.e. "main")

That is because those modules defines contracts tests: they are only testing interfaces, not made to be run directly. James implementation would derive those tests inside a test folder, and run them against the implementation. The reason to locate those contracts into mail folder is to benefit from maven transitive dependencies.

I get that those are abstract classes and are not intended to be run directly (or can't be for that matter) - while testing I leaned on that to simply run "in memory" flavour which was simply the fastest/most covenient.

I get that you can use it as maven dependency though I think it should be possible to do it as "test" scope as well - maven should still allow to resolve transitive dependencies here?

There's no transitive dependencies for test-jar qualifier.

exemple: all dependencies declared in mpt-imapmailbox-core would need to be re-declared in mpt-imapmailbox-memory, mpt-imapmailbox-cassandra, etc...

That's the main reason behind moving contract test suites for maven projects dedicated to tests into main.

[...]

Best regards,

Benoit

---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscr...@james.apache.org
For additional commands, e-mail: server-dev-h...@james.apache.org

Reply via email to