james-server-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From adup...@apache.org
Subject [2/9] james-project git commit: MPT-43 Add a MPT `AWAIT` command
Date Mon, 05 Nov 2018 14:26:49 GMT
MPT-43 Add a MPT `AWAIT` command

This makes the MPT indexer test both more robust (we can wait longer for
data to be indexed if needed) and faster (no need to be waiting for nothing).

This commit:
 - Solves build instability in MPT IMAP SEARCH tests on top of indexers
 - Fasten tests of ~6 seconds

Note that DEPLOYMENT tests does not rely on AWAIT keyword

ammend


Project: http://git-wip-us.apache.org/repos/asf/james-project/repo
Commit: http://git-wip-us.apache.org/repos/asf/james-project/commit/83b6791f
Tree: http://git-wip-us.apache.org/repos/asf/james-project/tree/83b6791f
Diff: http://git-wip-us.apache.org/repos/asf/james-project/diff/83b6791f

Branch: refs/heads/master
Commit: 83b6791f208ddc536a389b77304373f5bbd34eed
Parents: 1367247
Author: Benoit Tellier <btellier@linagora.com>
Authored: Mon Nov 5 10:24:11 2018 +0700
Committer: Benoit Tellier <btellier@linagora.com>
Committed: Mon Nov 5 10:36:23 2018 +0700

----------------------------------------------------------------------
 .../lucene/search/LuceneMessageSearchIndex.java |  4 ++++
 .../java/org/apache/james/mpt/api/Session.java  |  2 ++
 .../protocol/FileProtocolSessionBuilder.java    |  2 ++
 .../james/mpt/protocol/ProtocolSession.java     | 23 ++++++++++++++++++++
 .../mpt/protocol/ProtocolSessionBuilder.java    |  2 ++
 .../james/mpt/session/ExternalSession.java      |  6 +++++
 .../cassandra/host/CassandraHostSystem.java     |  8 +++++--
 .../james/mpt/host/JamesImapHostSystem.java     |  6 +++++
 .../imap/scripts/UidSearchAtomsIndexer.test     |  4 ++--
 .../host/ElasticSearchHostSystem.java           |  7 +++++-
 .../imapmailbox/hbase/host/HBaseHostSystem.java |  7 +++++-
 .../inmemory/host/InMemoryHostSystem.java       |  5 +++++
 .../mpt/imapmailbox/jcr/host/JCRHostSystem.java |  6 ++++-
 .../mpt/imapmailbox/jpa/host/JPAHostSystem.java |  4 ++++
 .../host/LuceneSearchHostSystem.java            |  7 +++++-
 .../maildir/host/MaildirHostSystem.java         |  6 ++++-
 .../james/mpt/host/ManageSieveSession.java      | 13 +++++++----
 17 files changed, 99 insertions(+), 13 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/james-project/blob/83b6791f/mailbox/lucene/src/main/java/org/apache/james/mailbox/lucene/search/LuceneMessageSearchIndex.java
----------------------------------------------------------------------
diff --git a/mailbox/lucene/src/main/java/org/apache/james/mailbox/lucene/search/LuceneMessageSearchIndex.java
b/mailbox/lucene/src/main/java/org/apache/james/mailbox/lucene/search/LuceneMessageSearchIndex.java
index b86c53e..964cdc8 100644
--- a/mailbox/lucene/src/main/java/org/apache/james/mailbox/lucene/search/LuceneMessageSearchIndex.java
+++ b/mailbox/lucene/src/main/java/org/apache/james/mailbox/lucene/search/LuceneMessageSearchIndex.java
@@ -1353,4 +1353,8 @@ public class LuceneMessageSearchIndex extends ListeningMessageSearchIndex
{
             throw new MailboxException("Unable to delete message from index", e);
         }
     }
+
+    public void commit() throws IOException {
+        writer.commit();
+    }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/james-project/blob/83b6791f/mpt/core/src/main/java/org/apache/james/mpt/api/Session.java
----------------------------------------------------------------------
diff --git a/mpt/core/src/main/java/org/apache/james/mpt/api/Session.java b/mpt/core/src/main/java/org/apache/james/mpt/api/Session.java
index 170b365..5f851d0 100644
--- a/mpt/core/src/main/java/org/apache/james/mpt/api/Session.java
+++ b/mpt/core/src/main/java/org/apache/james/mpt/api/Session.java
@@ -59,4 +59,6 @@ public interface Session {
      * @throws Exception
      */
     void stop() throws Exception;
+
+    void await() throws Exception;
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/james-project/blob/83b6791f/mpt/core/src/main/java/org/apache/james/mpt/protocol/FileProtocolSessionBuilder.java
----------------------------------------------------------------------
diff --git a/mpt/core/src/main/java/org/apache/james/mpt/protocol/FileProtocolSessionBuilder.java
b/mpt/core/src/main/java/org/apache/james/mpt/protocol/FileProtocolSessionBuilder.java
index 09effae..9185782 100644
--- a/mpt/core/src/main/java/org/apache/james/mpt/protocol/FileProtocolSessionBuilder.java
+++ b/mpt/core/src/main/java/org/apache/james/mpt/protocol/FileProtocolSessionBuilder.java
@@ -134,6 +134,8 @@ public class FileProtocolSessionBuilder extends ProtocolSessionBuilder
{
                     }
                 } else if (next.startsWith(REINIT)) {
                     session.reinit(sessionNumber);
+                }  else if (next.startsWith(AWAIT)) {
+                    session.await(sessionNumber);
                 } else if (next.startsWith(OPEN_UNORDERED_BLOCK_TAG)) {
                     List<String> unorderedLines = new ArrayList<>(5);
                     next = reader.readLine();

http://git-wip-us.apache.org/repos/asf/james-project/blob/83b6791f/mpt/core/src/main/java/org/apache/james/mpt/protocol/ProtocolSession.java
----------------------------------------------------------------------
diff --git a/mpt/core/src/main/java/org/apache/james/mpt/protocol/ProtocolSession.java b/mpt/core/src/main/java/org/apache/james/mpt/protocol/ProtocolSession.java
index 77f9f86..add4a25 100644
--- a/mpt/core/src/main/java/org/apache/james/mpt/protocol/ProtocolSession.java
+++ b/mpt/core/src/main/java/org/apache/james/mpt/protocol/ProtocolSession.java
@@ -219,6 +219,11 @@ public class ProtocolSession implements ProtocolInteractor {
         testElements.add(new ReinitElement(sessionNumber));
     }
 
+    public void await(int sessionNumber) {
+        this.maxSessionNumber = Math.max(this.maxSessionNumber, sessionNumber);
+        testElements.add(new AwaitElement(sessionNumber));
+    }
+
     public void timer(TimerCommand timerCommand, String timerName) {
         testElements.add(new TimerElement(timerCommand, timerName));
     }
@@ -630,6 +635,24 @@ public class ProtocolSession implements ProtocolInteractor {
         }
     }
 
+    private class AwaitElement implements ProtocolElement {
+        private final int sessionNumber;
+
+        private AwaitElement(int sessionNumber) {
+            this.sessionNumber = Math.max(0, sessionNumber);
+        }
+
+        @Override
+        public void testProtocol(Session[] sessions, boolean continueAfterFailure) throws
Exception {
+            sessions[sessionNumber].await();
+        }
+
+        @Override
+        public boolean isClient() {
+            return false;
+        }
+    }
+
     /**
      * Allow you to wait a given time at a given point of the test script
      */

http://git-wip-us.apache.org/repos/asf/james-project/blob/83b6791f/mpt/core/src/main/java/org/apache/james/mpt/protocol/ProtocolSessionBuilder.java
----------------------------------------------------------------------
diff --git a/mpt/core/src/main/java/org/apache/james/mpt/protocol/ProtocolSessionBuilder.java
b/mpt/core/src/main/java/org/apache/james/mpt/protocol/ProtocolSessionBuilder.java
index 967a10b..0d52c9e 100644
--- a/mpt/core/src/main/java/org/apache/james/mpt/protocol/ProtocolSessionBuilder.java
+++ b/mpt/core/src/main/java/org/apache/james/mpt/protocol/ProtocolSessionBuilder.java
@@ -41,6 +41,8 @@ public class ProtocolSessionBuilder {
 
     public static final String LOG = "LOG";
 
+    public static final String AWAIT = "AWAIT";
+
     public static final String WAIT = "WAIT";
 
     public static final String SERVER_CONTINUATION_TAG = "S: \\+";

http://git-wip-us.apache.org/repos/asf/james-project/blob/83b6791f/mpt/core/src/main/java/org/apache/james/mpt/session/ExternalSession.java
----------------------------------------------------------------------
diff --git a/mpt/core/src/main/java/org/apache/james/mpt/session/ExternalSession.java b/mpt/core/src/main/java/org/apache/james/mpt/session/ExternalSession.java
index c9981c7..c74b136 100644
--- a/mpt/core/src/main/java/org/apache/james/mpt/session/ExternalSession.java
+++ b/mpt/core/src/main/java/org/apache/james/mpt/session/ExternalSession.java
@@ -35,6 +35,7 @@ import org.awaitility.Duration;
 public final class ExternalSession implements Session {
 
     private static final byte[] CRLF = { '\r', '\n' };
+    public static final int FIVE_SECONDS = 5000;
 
     private final SocketChannel socket;
 
@@ -172,6 +173,11 @@ public final class ExternalSession implements Session {
         monitor.debug("[Done]");
     }
 
+    @Override
+    public void await() throws Exception {
+        Thread.sleep(FIVE_SECONDS);
+    }
+
     /**
      * Constructs a <code>String</code> with all attributes in name = value
      * format.

http://git-wip-us.apache.org/repos/asf/james-project/blob/83b6791f/mpt/impl/imap-mailbox/cassandra/src/test/java/org/apache/james/mpt/imapmailbox/cassandra/host/CassandraHostSystem.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/cassandra/src/test/java/org/apache/james/mpt/imapmailbox/cassandra/host/CassandraHostSystem.java
b/mpt/impl/imap-mailbox/cassandra/src/test/java/org/apache/james/mpt/imapmailbox/cassandra/host/CassandraHostSystem.java
index aaa1b62..f40a588 100644
--- a/mpt/impl/imap-mailbox/cassandra/src/test/java/org/apache/james/mpt/imapmailbox/cassandra/host/CassandraHostSystem.java
+++ b/mpt/impl/imap-mailbox/cassandra/src/test/java/org/apache/james/mpt/imapmailbox/cassandra/host/CassandraHostSystem.java
@@ -38,7 +38,6 @@ import org.apache.james.mailbox.cassandra.quota.CassandraGlobalMaxQuotaDao;
 import org.apache.james.mailbox.cassandra.quota.CassandraPerDomainMaxQuotaDao;
 import org.apache.james.mailbox.cassandra.quota.CassandraPerUserMaxQuotaDao;
 import org.apache.james.mailbox.cassandra.quota.CassandraPerUserMaxQuotaManager;
-import org.apache.james.mailbox.exception.MailboxException;
 import org.apache.james.mailbox.quota.QuotaRootResolver;
 import org.apache.james.mailbox.store.JVMMailboxPathLocker;
 import org.apache.james.mailbox.store.StoreMailboxAnnotationManager;
@@ -131,7 +130,7 @@ public class CassandraHostSystem extends JamesImapHostSystem {
     }
 
     @Override
-    public void setQuotaLimits(QuotaCount maxMessageQuota, QuotaSize maxStorageQuota) throws
MailboxException {
+    public void setQuotaLimits(QuotaCount maxMessageQuota, QuotaSize maxStorageQuota) {
         perUserMaxQuotaManager.setGlobalMaxMessage(maxMessageQuota);
         perUserMaxQuotaManager.setGlobalMaxStorage(maxStorageQuota);
     }
@@ -140,4 +139,9 @@ public class CassandraHostSystem extends JamesImapHostSystem {
     public MailboxManager getMailboxManager() {
         return mailboxManager;
     }
+
+    @Override
+    protected void await() {
+
+    }
 }

http://git-wip-us.apache.org/repos/asf/james-project/blob/83b6791f/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/host/JamesImapHostSystem.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/host/JamesImapHostSystem.java
b/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/host/JamesImapHostSystem.java
index f0ef2e9..4bd4f31 100644
--- a/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/host/JamesImapHostSystem.java
+++ b/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/host/JamesImapHostSystem.java
@@ -91,6 +91,8 @@ public abstract class JamesImapHostSystem implements ImapHostSystem, GrantRights
     }
 
     protected abstract MailboxManager getMailboxManager();
+
+    protected abstract void await() throws Exception;
     
     @Override
     public void createMailbox(MailboxPath mailboxPath) throws Exception {
@@ -166,6 +168,10 @@ public abstract class JamesImapHostSystem implements ImapHostSystem,
GrantRights
             in.nextLine(line);
         }
 
+        @Override
+        public void await() throws Exception {
+            JamesImapHostSystem.this.await();
+        }
     }
 
     private HierarchicalConfiguration userRepositoryConfiguration() {

http://git-wip-us.apache.org/repos/asf/james-project/blob/83b6791f/mpt/impl/imap-mailbox/core/src/main/resources/org/apache/james/imap/scripts/UidSearchAtomsIndexer.test
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/core/src/main/resources/org/apache/james/imap/scripts/UidSearchAtomsIndexer.test
b/mpt/impl/imap-mailbox/core/src/main/resources/org/apache/james/imap/scripts/UidSearchAtomsIndexer.test
index 54aa2c7..520cde1 100644
--- a/mpt/impl/imap-mailbox/core/src/main/resources/org/apache/james/imap/scripts/UidSearchAtomsIndexer.test
+++ b/mpt/impl/imap-mailbox/core/src/main/resources/org/apache/james/imap/scripts/UidSearchAtomsIndexer.test
@@ -2113,7 +2113,7 @@ S: A99 OK STORE completed\.
 
 LOG INFO Waiting for Indexer to index data
 
-WAIT 5000
+AWAIT
 
 LOG INFO Performing tests about search
 
@@ -2316,7 +2316,7 @@ S: A202 OK (\[.+\] )?APPEND completed\.
 
 LOG INFO Waiting for Indexer to index data
 
-WAIT 1000
+AWAIT
 
 LOG INFO Performing tests about search
 

http://git-wip-us.apache.org/repos/asf/james-project/blob/83b6791f/mpt/impl/imap-mailbox/elasticsearch/src/test/java/org/apache/james/mpt/imapmailbox/elasticsearch/host/ElasticSearchHostSystem.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/elasticsearch/src/test/java/org/apache/james/mpt/imapmailbox/elasticsearch/host/ElasticSearchHostSystem.java
b/mpt/impl/imap-mailbox/elasticsearch/src/test/java/org/apache/james/mpt/imapmailbox/elasticsearch/host/ElasticSearchHostSystem.java
index 7feed5d..6dc3c0c 100644
--- a/mpt/impl/imap-mailbox/elasticsearch/src/test/java/org/apache/james/mpt/imapmailbox/elasticsearch/host/ElasticSearchHostSystem.java
+++ b/mpt/impl/imap-mailbox/elasticsearch/src/test/java/org/apache/james/mpt/imapmailbox/elasticsearch/host/ElasticSearchHostSystem.java
@@ -138,7 +138,12 @@ public class ElasticSearchHostSystem extends JamesImapHostSystem {
     }
 
     @Override
-    public void setQuotaLimits(QuotaCount maxMessageQuota, QuotaSize maxStorageQuota) throws
Exception {
+    public void setQuotaLimits(QuotaCount maxMessageQuota, QuotaSize maxStorageQuota) {
         throw new NotImplementedException();
     }
+
+    @Override
+    protected void await() {
+        embeddedElasticSearch.awaitForElasticSearch();
+    }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/james-project/blob/83b6791f/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/host/HBaseHostSystem.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/host/HBaseHostSystem.java
b/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/host/HBaseHostSystem.java
index 0602994..df29157 100644
--- a/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/host/HBaseHostSystem.java
+++ b/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/host/HBaseHostSystem.java
@@ -179,7 +179,12 @@ public class HBaseHostSystem extends JamesImapHostSystem {
     }
 
     @Override
-    public void setQuotaLimits(QuotaCount maxMessageQuota, QuotaSize maxStorageQuota) throws
Exception {
+    public void setQuotaLimits(QuotaCount maxMessageQuota, QuotaSize maxStorageQuota) {
         throw new NotImplementedException();
     }
+
+    @Override
+    protected void await() {
+
+    }
 }

http://git-wip-us.apache.org/repos/asf/james-project/blob/83b6791f/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/host/InMemoryHostSystem.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/host/InMemoryHostSystem.java
b/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/host/InMemoryHostSystem.java
index 8160756..2de23d3 100644
--- a/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/host/InMemoryHostSystem.java
+++ b/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/host/InMemoryHostSystem.java
@@ -103,4 +103,9 @@ public class InMemoryHostSystem extends JamesImapHostSystem {
         perUserMaxQuotaManager.setGlobalMaxMessage(maxMessageQuota);
         perUserMaxQuotaManager.setGlobalMaxStorage(maxStorageQuota);
     }
+
+    @Override
+    protected void await() {
+
+    }
 }

http://git-wip-us.apache.org/repos/asf/james-project/blob/83b6791f/mpt/impl/imap-mailbox/jcr/src/test/java/org/apache/james/mpt/imapmailbox/jcr/host/JCRHostSystem.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/jcr/src/test/java/org/apache/james/mpt/imapmailbox/jcr/host/JCRHostSystem.java
b/mpt/impl/imap-mailbox/jcr/src/test/java/org/apache/james/mpt/imapmailbox/jcr/host/JCRHostSystem.java
index 2e8da35..0f62859 100644
--- a/mpt/impl/imap-mailbox/jcr/src/test/java/org/apache/james/mpt/imapmailbox/jcr/host/JCRHostSystem.java
+++ b/mpt/impl/imap-mailbox/jcr/src/test/java/org/apache/james/mpt/imapmailbox/jcr/host/JCRHostSystem.java
@@ -180,8 +180,12 @@ public class JCRHostSystem extends JamesImapHostSystem {
     }
 
     @Override
-    public void setQuotaLimits(QuotaCount maxMessageQuota, QuotaSize maxStorageQuota) throws
Exception {
+    public void setQuotaLimits(QuotaCount maxMessageQuota, QuotaSize maxStorageQuota) {
         throw new NotImplementedException();
     }
 
+    @Override
+    protected void await() {
+
+    }
 }

http://git-wip-us.apache.org/repos/asf/james-project/blob/83b6791f/mpt/impl/imap-mailbox/jpa/src/test/java/org/apache/james/mpt/imapmailbox/jpa/host/JPAHostSystem.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/jpa/src/test/java/org/apache/james/mpt/imapmailbox/jpa/host/JPAHostSystem.java
b/mpt/impl/imap-mailbox/jpa/src/test/java/org/apache/james/mpt/imapmailbox/jpa/host/JPAHostSystem.java
index f89865c..d78cbe1 100644
--- a/mpt/impl/imap-mailbox/jpa/src/test/java/org/apache/james/mpt/imapmailbox/jpa/host/JPAHostSystem.java
+++ b/mpt/impl/imap-mailbox/jpa/src/test/java/org/apache/james/mpt/imapmailbox/jpa/host/JPAHostSystem.java
@@ -170,4 +170,8 @@ public class JPAHostSystem extends JamesImapHostSystem {
         maxQuotaManager.setGlobalMaxStorage(maxStorageQuota);
     }
 
+    @Override
+    protected void await() throws Exception {
+
+    }
 }

http://git-wip-us.apache.org/repos/asf/james-project/blob/83b6791f/mpt/impl/imap-mailbox/lucenesearch/src/test/java/org/apache/james/mpt/imapmailbox/lucenesearch/host/LuceneSearchHostSystem.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/lucenesearch/src/test/java/org/apache/james/mpt/imapmailbox/lucenesearch/host/LuceneSearchHostSystem.java
b/mpt/impl/imap-mailbox/lucenesearch/src/test/java/org/apache/james/mpt/imapmailbox/lucenesearch/host/LuceneSearchHostSystem.java
index a085f9e..6ebc72f 100644
--- a/mpt/impl/imap-mailbox/lucenesearch/src/test/java/org/apache/james/mpt/imapmailbox/lucenesearch/host/LuceneSearchHostSystem.java
+++ b/mpt/impl/imap-mailbox/lucenesearch/src/test/java/org/apache/james/mpt/imapmailbox/lucenesearch/host/LuceneSearchHostSystem.java
@@ -66,6 +66,7 @@ public class LuceneSearchHostSystem extends JamesImapHostSystem {
 
     private File tempFile;
     private InMemoryMailboxManager mailboxManager;
+    private LuceneMessageSearchIndex searchIndex;
 
     @Override
     public void beforeTest() throws Exception {
@@ -115,7 +116,7 @@ public class LuceneSearchHostSystem extends JamesImapHostSystem {
                 rightManager);
 
             FSDirectory fsDirectory = FSDirectory.open(tempFile);
-            LuceneMessageSearchIndex searchIndex = new LuceneMessageSearchIndex(mapperFactory,
new InMemoryId.Factory(), fsDirectory, messageIdFactory);
+            searchIndex = new LuceneMessageSearchIndex(mapperFactory, new InMemoryId.Factory(),
fsDirectory, messageIdFactory);
             searchIndex.setEnableSuffixMatch(true);
             mailboxManager.setMessageSearchIndex(searchIndex);
 
@@ -155,4 +156,8 @@ public class LuceneSearchHostSystem extends JamesImapHostSystem {
         throw new NotImplementedException();
     }
 
+    @Override
+    protected void await() throws Exception {
+        searchIndex.commit();
+    }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/james-project/blob/83b6791f/mpt/impl/imap-mailbox/maildir/src/test/java/org/apache/james/mpt/imapmailbox/maildir/host/MaildirHostSystem.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/maildir/src/test/java/org/apache/james/mpt/imapmailbox/maildir/host/MaildirHostSystem.java
b/mpt/impl/imap-mailbox/maildir/src/test/java/org/apache/james/mpt/imapmailbox/maildir/host/MaildirHostSystem.java
index 6592c09..4587a5a 100644
--- a/mpt/impl/imap-mailbox/maildir/src/test/java/org/apache/james/mpt/imapmailbox/maildir/host/MaildirHostSystem.java
+++ b/mpt/impl/imap-mailbox/maildir/src/test/java/org/apache/james/mpt/imapmailbox/maildir/host/MaildirHostSystem.java
@@ -127,8 +127,12 @@ public class MaildirHostSystem extends JamesImapHostSystem {
     }
 
     @Override
-    public void setQuotaLimits(QuotaCount maxMessageQuota, QuotaSize maxStorageQuota) throws
Exception {
+    public void setQuotaLimits(QuotaCount maxMessageQuota, QuotaSize maxStorageQuota) {
         throw new NotImplementedException();
     }
 
+    @Override
+    protected void await() {
+
+    }
 }

http://git-wip-us.apache.org/repos/asf/james-project/blob/83b6791f/mpt/impl/managesieve/core/src/main/java/org/apache/james/mpt/host/ManageSieveSession.java
----------------------------------------------------------------------
diff --git a/mpt/impl/managesieve/core/src/main/java/org/apache/james/mpt/host/ManageSieveSession.java
b/mpt/impl/managesieve/core/src/main/java/org/apache/james/mpt/host/ManageSieveSession.java
index 949014e..9e8033d 100644
--- a/mpt/impl/managesieve/core/src/main/java/org/apache/james/mpt/host/ManageSieveSession.java
+++ b/mpt/impl/managesieve/core/src/main/java/org/apache/james/mpt/host/ManageSieveSession.java
@@ -74,19 +74,24 @@ public class ManageSieveSession implements Session {
     }
 
     @Override
-    public void start() throws Exception {
+    public void start() {
     }
 
     @Override
-    public void stop() throws Exception {
+    public void stop() {
     }
 
     @Override
-    public void restart() throws Exception {
+    public void restart() {
     }
 
     @Override
-    public void writeLine(String line) throws Exception {
+    public void await() {
+
+    }
+
+    @Override
+    public void writeLine(String line) {
         isReadLast = false;
         in.nextLine(line);
     }


---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org


Mime
View raw message