chibenwa commented on a change in pull request #554:
URL: https://github.com/apache/james-project/pull/554#discussion_r678020766
##########
File path:
server/protocols/jmap-rfc-8621-integration-tests/jmap-rfc-8621-integration-tests-common/src/main/scala/org/apache/james/jmap/rfc8621/contract/ThreadGetContract.scala
##########
@@ -31,16 +34,24 @@ import
org.apache.james.jmap.core.ResponseObject.SESSION_STATE
import org.apache.james.jmap.http.UserCredential
import
org.apache.james.jmap.rfc8621.contract.Fixture.{ACCEPT_RFC8621_VERSION_HEADER,
BOB, BOB_PASSWORD, DOMAIN, authScheme, baseRequestSpecBuilder}
import org.apache.james.mailbox.MessageManager
-import org.apache.james.mailbox.model.MailboxPath
+import org.apache.james.mailbox.model.{MailboxId, MailboxPath, SearchQuery}
import org.apache.james.mime4j.dom.Message
import org.apache.james.mime4j.stream.RawField
import org.apache.james.modules.MailboxProbeImpl
import org.apache.james.utils.DataProbeImpl
import org.junit.jupiter.api.{BeforeEach, Test}
trait ThreadGetContract {
+
+ protected def awaitMessageCount(mailboxIds: util.List[MailboxId], query:
SearchQuery, messageCount: Long): Unit
+
+ @throws(classOf[IOException])
Review comment:
```suggestion
@throws(classOf[IOException])
```
We IMO do not need this...
##########
File path:
server/protocols/jmap-rfc-8621-integration-tests/jmap-rfc-8621-integration-tests-common/src/main/scala/org/apache/james/jmap/rfc8621/contract/ThreadGetContract.scala
##########
@@ -354,7 +349,7 @@ trait ThreadGetContract {
.header(ACCEPT.toString, ACCEPT_RFC8621_VERSION_HEADER)
.body(request)
.when
- .post
+ .post.prettyPeek()
Review comment:
idem
##########
File path:
server/protocols/jmap-rfc-8621-integration-tests/jmap-rfc-8621-integration-tests-common/src/main/scala/org/apache/james/jmap/rfc8621/contract/ThreadGetContract.scala
##########
@@ -436,7 +433,7 @@ trait ThreadGetContract {
.header(ACCEPT.toString, ACCEPT_RFC8621_VERSION_HEADER)
.body(request)
.when
- .post
+ .post.prettyPeek()
Review comment:
idem
##########
File path:
server/protocols/jmap-rfc-8621-integration-tests/jmap-rfc-8621-integration-tests-common/src/main/scala/org/apache/james/jmap/rfc8621/contract/ThreadGetContract.scala
##########
@@ -193,7 +208,7 @@ trait ThreadGetContract {
.header(ACCEPT.toString, ACCEPT_RFC8621_VERSION_HEADER)
.body(request)
.when
- .post
+ .post.prettyPeek()
Review comment:
debug spotted
##########
File path:
server/protocols/jmap-rfc-8621-integration-tests/jmap-rfc-8621-integration-tests-common/src/main/scala/org/apache/james/jmap/rfc8621/contract/ThreadGetContract.scala
##########
@@ -273,7 +292,7 @@ trait ThreadGetContract {
.header(ACCEPT.toString, ACCEPT_RFC8621_VERSION_HEADER)
.body(request)
.when
- .post
+ .post.prettyPeek()
Review comment:
idem
##########
File path:
server/protocols/jmap-rfc-8621-integration-tests/jmap-rfc-8621-integration-tests-common/src/main/scala/org/apache/james/jmap/rfc8621/contract/ThreadGetContract.scala
##########
@@ -165,6 +165,7 @@ trait ThreadGetContract {
MessageManager.AppendCommand.from(Message.Builder.of.setSubject("Test")
.setMessageId("Message-ID-1")
.setBody("testmail", StandardCharsets.UTF_8)))
+ Thread.sleep(1000)
Review comment:
I prefer to not use the .sleep and wrap the assertion in an await.
`Await.untilAsserted(() -> ...)`
##########
File path:
server/protocols/jmap-rfc-8621-integration-tests/jmap-rfc-8621-integration-tests-common/src/main/scala/org/apache/james/jmap/rfc8621/contract/ThreadGetContract.scala
##########
@@ -515,7 +514,7 @@ trait ThreadGetContract {
.header(ACCEPT.toString, ACCEPT_RFC8621_VERSION_HEADER)
.body(request)
.when
- .post
+ .post.prettyPeek()
Review comment:
idem
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]