Hello Wojtek,
Answers inlined.
Best regards
Benoit
On 20/03/2023 23:03, Wojtek wrote:
Hi,
followup to
https://github.com/apache/james-project/pull/1476#issuecomment-1475140112
And the second thing - why some testing code is in the main
directoryinstead oftest`?
You have a specific example in mind?
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.
~~
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!
~~
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?
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....
I'm not sure what's the best course of action is here: IMHO if the
test passes then there should only be single line in the output:
"Tests run: x, Failures: 0, Errors: 0, Skipped: 0". If there are
failures then only ST related to that failure should be logged?
---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscr...@james.apache.org
For additional commands, e-mail: server-dev-h...@james.apache.org