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?

~~

Regarding test execution time and touching on https://issues.apache.org/jira/browse/JAMES-3879 - would you be OK with enabling one of maven extensions that measure execution time (https://github.com/khmarbaise/maven-buildtime-profiler or https://github.com/timgifford/maven-buildtime-extension)?
I bet it would!

I created PR: https://github.com/apache/james-project/pull/1498

~~

And for exceptions, for example running tests in `/mpt/impl/imap-mailbox` gives:

```
12:27:47.892 [ERROR] c.r.c.i.ForgivingExceptionHandler - Consumer com.rabbitmq.client.impl.recovery.AutorecoveringChannel$2@289514d6 (amq.ctag-UxIwBfXKU00QZN9cT-Wd4w) method handleCancel for channel AMQChannel(amqp://guest@127.0.0.1:58238/,6) threw an exception for channel AMQChannel(amqp://guest@127.0.0.1:58238/,6) com.rabbitmq.client.ShutdownSignalException: clean connection shutdown; protocol method: #method<connection.close>(reply-code=200, reply-text=OK, class-id=0, method-id=0)         at com.rabbitmq.utility.ValueOrException.getValue(ValueOrException.java:66)         at com.rabbitmq.utility.BlockingValueOrException.uninterruptibleGetValue(BlockingValueOrException.java:36)         at com.rabbitmq.client.impl.AMQChannel$BlockingRpcContinuation.getReply(AMQChannel.java:502)
        at com.rabbitmq.client.impl.ChannelN.close(ChannelN.java:617)

```

It's exception but looks like just information that shutdown happens and it went ok?
>
I imagine this could either be that, or an AMQP consumer that is not shut down before the connection?

I'm not sure, not much experience with rabbitmq/AMQP unfrotunatelly.

And the full build (https://ci-builds.apache.org/job/james/job/ApacheJames/job/PR-1476/9/console) has other issues, for example lots of NoSuchMethodException from `MailetdocsReport.buildDescriptors (MailetdocsReport.java:49)` (those are quite probably caused by switch to injection-by-constructor and lack of default constructor) or ClassNotFoundException (not sure about those, classpath/lack of dependency) but then the whole Mailetdocs Report fails in a lot of cases (~1,6k exceptions from total of ~8k)
+1 to open a ticket and address that one.

Likely a easy fix inside the mailetdoc plugin....

Done: https://issues.apache.org/jira/browse/JAMES-3896

--
Wojtek

---------------------------------------------------------------------
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