This is an automated email from the ASF dual-hosted git repository.
rcordier pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/james-project.git
The following commit(s) were added to refs/heads/master by this push:
new 263ef76f7a JAMES-3925 Enforce quota for JMAP uploads - fix the
unstable test
263ef76f7a is described below
commit 263ef76f7a920f02995df92a3838ec8001cb4aef
Author: Tung Tran <[email protected]>
AuthorDate: Wed Oct 4 17:25:37 2023 +0700
JAMES-3925 Enforce quota for JMAP uploads - fix the unstable test
---
.../scala/org/apache/james/jmap/api/upload/UploadServiceContract.scala | 3 +++
1 file changed, 3 insertions(+)
diff --git
a/server/data/data-jmap/src/test/scala/org/apache/james/jmap/api/upload/UploadServiceContract.scala
b/server/data/data-jmap/src/test/scala/org/apache/james/jmap/api/upload/UploadServiceContract.scala
index d7537f3a72..82ab449574 100644
---
a/server/data/data-jmap/src/test/scala/org/apache/james/jmap/api/upload/UploadServiceContract.scala
+++
b/server/data/data-jmap/src/test/scala/org/apache/james/jmap/api/upload/UploadServiceContract.scala
@@ -35,6 +35,8 @@ import org.awaitility.Durations.ONE_HUNDRED_MILLISECONDS
import org.junit.jupiter.api.Test
import reactor.core.scala.publisher.{SFlux, SMono}
+import scala.concurrent.duration.MICROSECONDS
+
object UploadServiceContract {
private lazy val UPLOAD_QUOTA_LIMIT: Long = 100L
lazy val TEST_CONFIGURATION: JmapUploadQuotaConfiguration = new
JmapUploadQuotaConfiguration(UPLOAD_QUOTA_LIMIT)
@@ -183,6 +185,7 @@ trait UploadServiceContract {
def givenQuotaExceededThenUploadShouldRepairInconsistentCurrentUsage(): Unit
= {
Range.inclusive(1, 10)
.foreach(_ =>
SMono.fromPublisher(testee.upload(asInputStream(TEN_BYTES_DATA_STRING),
CONTENT_TYPE, BOB))
+ .delayElement(scala.concurrent.duration.Duration(200, MICROSECONDS))
.block())
// Try to make the current stored usage inconsistent
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]