You are viewing a plain text version of this content. The canonical link for it is here.
Posted to server-dev@james.apache.org by ad...@apache.org on 2017/11/22 13:48:14 UTC
[1/2] james-project git commit: JAMES-2009 The list of uid should be
concurrent so that thread safe
Repository: james-project
Updated Branches:
refs/heads/master 4faefa448 -> 9fc7e722d
JAMES-2009 The list of uid should be concurrent so that thread safe
Project: http://git-wip-us.apache.org/repos/asf/james-project/repo
Commit: http://git-wip-us.apache.org/repos/asf/james-project/commit/3bddaef8
Tree: http://git-wip-us.apache.org/repos/asf/james-project/tree/3bddaef8
Diff: http://git-wip-us.apache.org/repos/asf/james-project/diff/3bddaef8
Branch: refs/heads/master
Commit: 3bddaef84249e0db317449c8b4765c2f8a491dbf
Parents: 4faefa4
Author: quynhn <qn...@linagora.com>
Authored: Wed Nov 22 13:56:35 2017 +0700
Committer: quynhn <qn...@linagora.com>
Committed: Wed Nov 22 13:56:35 2017 +0700
----------------------------------------------------------------------
.../org/apache/james/mailbox/MailboxManagerStressTest.java | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/james-project/blob/3bddaef8/mailbox/api/src/test/java/org/apache/james/mailbox/MailboxManagerStressTest.java
----------------------------------------------------------------------
diff --git a/mailbox/api/src/test/java/org/apache/james/mailbox/MailboxManagerStressTest.java b/mailbox/api/src/test/java/org/apache/james/mailbox/MailboxManagerStressTest.java
index 1ad56e0..c3d786b 100644
--- a/mailbox/api/src/test/java/org/apache/james/mailbox/MailboxManagerStressTest.java
+++ b/mailbox/api/src/test/java/org/apache/james/mailbox/MailboxManagerStressTest.java
@@ -22,13 +22,14 @@ import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import java.io.ByteArrayInputStream;
-import java.util.ArrayList;
+import java.util.Collection;
import java.util.Date;
-import java.util.List;
import java.util.concurrent.ConcurrentHashMap;
+import java.util.concurrent.ConcurrentLinkedDeque;
import java.util.concurrent.CountDownLatch;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
+import java.util.concurrent.TimeUnit;
import java.util.concurrent.atomic.AtomicBoolean;
import javax.mail.Flags;
@@ -58,7 +59,7 @@ public abstract class MailboxManagerStressTest {
final CountDownLatch latch = new CountDownLatch(APPEND_OPERATIONS);
final ExecutorService pool = Executors.newFixedThreadPool(APPEND_OPERATIONS / 2);
- final List<MessageUid> uList = new ArrayList<>();
+ final Collection<MessageUid> uList = new ConcurrentLinkedDeque<>();
final String username = "username";
MailboxSession session = mailboxManager.createSystemSession(username);
mailboxManager.startProcessingRequest(session);
@@ -121,7 +122,7 @@ public abstract class MailboxManagerStressTest {
});
}
- latch.await();
+ latch.await(10L, TimeUnit.MINUTES);
// check if there is no duplicates
// For mailboxes without locks, even if the UID is monotic, as re-scheduling can happen between UID generation and event delivery,
---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org
[2/2] james-project git commit: JAMES-2009 Decrease pool value to
make stress test can run
Posted by ad...@apache.org.
JAMES-2009 Decrease pool value to make stress test can run
Project: http://git-wip-us.apache.org/repos/asf/james-project/repo
Commit: http://git-wip-us.apache.org/repos/asf/james-project/commit/9fc7e722
Tree: http://git-wip-us.apache.org/repos/asf/james-project/tree/9fc7e722
Diff: http://git-wip-us.apache.org/repos/asf/james-project/diff/9fc7e722
Branch: refs/heads/master
Commit: 9fc7e722d415b95ce2898c6419de44b86110c11e
Parents: 3bddaef
Author: quynhn <qn...@linagora.com>
Authored: Wed Nov 22 13:59:56 2017 +0700
Committer: quynhn <qn...@linagora.com>
Committed: Wed Nov 22 13:59:56 2017 +0700
----------------------------------------------------------------------
.../java/org/apache/james/mailbox/MailboxManagerStressTest.java | 2 +-
.../james/mailbox/cassandra/CassandraMailboxManagerStressTest.java | 2 --
2 files changed, 1 insertion(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/james-project/blob/9fc7e722/mailbox/api/src/test/java/org/apache/james/mailbox/MailboxManagerStressTest.java
----------------------------------------------------------------------
diff --git a/mailbox/api/src/test/java/org/apache/james/mailbox/MailboxManagerStressTest.java b/mailbox/api/src/test/java/org/apache/james/mailbox/MailboxManagerStressTest.java
index c3d786b..0e6a5b5 100644
--- a/mailbox/api/src/test/java/org/apache/james/mailbox/MailboxManagerStressTest.java
+++ b/mailbox/api/src/test/java/org/apache/james/mailbox/MailboxManagerStressTest.java
@@ -58,7 +58,7 @@ public abstract class MailboxManagerStressTest {
public void testStressTest() throws InterruptedException, MailboxException {
final CountDownLatch latch = new CountDownLatch(APPEND_OPERATIONS);
- final ExecutorService pool = Executors.newFixedThreadPool(APPEND_OPERATIONS / 2);
+ final ExecutorService pool = Executors.newFixedThreadPool(APPEND_OPERATIONS / 20);
final Collection<MessageUid> uList = new ConcurrentLinkedDeque<>();
final String username = "username";
MailboxSession session = mailboxManager.createSystemSession(username);
http://git-wip-us.apache.org/repos/asf/james-project/blob/9fc7e722/mailbox/cassandra/src/test/java/org/apache/james/mailbox/cassandra/CassandraMailboxManagerStressTest.java
----------------------------------------------------------------------
diff --git a/mailbox/cassandra/src/test/java/org/apache/james/mailbox/cassandra/CassandraMailboxManagerStressTest.java b/mailbox/cassandra/src/test/java/org/apache/james/mailbox/cassandra/CassandraMailboxManagerStressTest.java
index 8c744fb..c8f0092 100644
--- a/mailbox/cassandra/src/test/java/org/apache/james/mailbox/cassandra/CassandraMailboxManagerStressTest.java
+++ b/mailbox/cassandra/src/test/java/org/apache/james/mailbox/cassandra/CassandraMailboxManagerStressTest.java
@@ -41,9 +41,7 @@ import org.apache.james.mailbox.cassandra.modules.CassandraUidModule;
import org.junit.After;
import org.junit.Before;
import org.junit.ClassRule;
-import org.junit.Ignore;
-@Ignore("https://issues.apache.org/jira/browse/JAMES-2009")
public class CassandraMailboxManagerStressTest extends MailboxManagerStressTest {
@ClassRule public static DockerCassandraRule cassandraServer = new DockerCassandraRule();
---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org