james-server-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rdon...@apache.org
Subject svn commit: r635301 - in /james/server/trunk: experimental-seda-imap-function/src/test/resources/org/apache/james/test/functional/imap/scripts/ phoenix-deployment/src/test/org/apache/james/experimental/imapserver/ torque-mailboxmanager-function/src/mai...
Date Sun, 09 Mar 2008 17:25:12 GMT
Author: rdonkin
Date: Sun Mar  9 10:25:10 2008
New Revision: 635301

URL: http://svn.apache.org/viewvc?rev=635301&view=rev
Log:
Basic search functional tests now run.

Modified:
    james/server/trunk/experimental-seda-imap-function/src/test/resources/org/apache/james/test/functional/imap/scripts/Search.test
    james/server/trunk/phoenix-deployment/src/test/org/apache/james/experimental/imapserver/ExperimentalSelectedStateTest.java
    james/server/trunk/torque-mailboxmanager-function/src/main/java/org/apache/james/mailboxmanager/torque/TorqueMailbox.java

Modified: james/server/trunk/experimental-seda-imap-function/src/test/resources/org/apache/james/test/functional/imap/scripts/Search.test
URL: http://svn.apache.org/viewvc/james/server/trunk/experimental-seda-imap-function/src/test/resources/org/apache/james/test/functional/imap/scripts/Search.test?rev=635301&r1=635300&r2=635301&view=diff
==============================================================================
--- james/server/trunk/experimental-seda-imap-function/src/test/resources/org/apache/james/test/functional/imap/scripts/Search.test
(original)
+++ james/server/trunk/experimental-seda-imap-function/src/test/resources/org/apache/james/test/functional/imap/scripts/Search.test
Sun Mar  9 10:25:10 2008
@@ -16,7 +16,19 @@
 # specific language governing permissions and limitations      #
 # under the License.                                           #
 ################################################################
-# TODO implement search - currently returns everything regardless
 C: a SEARCH FLAGGED
+S: \* SEARCH
+S: a OK SEARCH completed.
+C: b STORE 1:* +FLAGS.SILENT (\FLAGGED)
+S: b OK STORE completed.
+C: c SEARCH FLAGGED
 S: \* SEARCH 1 2 3 4
-S: a OK SEARCH completed
+S: c OK SEARCH completed.
+C: d STORE 3:* -FLAGS.SILENT (\FLAGGED)
+S: d OK STORE completed.
+C: e SEARCH FLAGGED
+S: \* SEARCH 1 2
+S: e OK SEARCH completed.
+C: e SEARCH UNFLAGGED
+S: \* SEARCH 3 4
+S: e OK SEARCH completed.
\ No newline at end of file

Modified: james/server/trunk/phoenix-deployment/src/test/org/apache/james/experimental/imapserver/ExperimentalSelectedStateTest.java
URL: http://svn.apache.org/viewvc/james/server/trunk/phoenix-deployment/src/test/org/apache/james/experimental/imapserver/ExperimentalSelectedStateTest.java?rev=635301&r1=635300&r2=635301&view=diff
==============================================================================
--- james/server/trunk/phoenix-deployment/src/test/org/apache/james/experimental/imapserver/ExperimentalSelectedStateTest.java
(original)
+++ james/server/trunk/phoenix-deployment/src/test/org/apache/james/experimental/imapserver/ExperimentalSelectedStateTest.java
Sun Mar  9 10:25:10 2008
@@ -26,11 +26,7 @@
     public ExperimentalSelectedStateTest() throws Exception {
         super(HostSystemFactory.createStandardImap());
     }
-
-    public void testSearchUS() throws Exception {
-        //TODO Implement search
-    }
-
+    
     public void testFetchMultipleMessagesUS() throws Exception {
         // TODO Auto-generated method stub
         //super.testFetchMultipleMessages();
@@ -47,10 +43,6 @@
         // super.testUid();
     }
 
-    public void testSearchKOREA() throws Exception {
-        //TODO Implement search
-    }
-
     public void testFetchMultipleMessagesKOREA() throws Exception {
         // TODO Auto-generated method stub
         //super.testFetchMultipleMessages();
@@ -66,10 +58,6 @@
         // UID fetch not working very well
         // super.testUid();
     }  
-
-    public void testSearchITALY() throws Exception {
-        //TODO Implement search
-    }
 
     public void testFetchMultipleMessagesITALY() throws Exception {
         // TODO Auto-generated method stub

Modified: james/server/trunk/torque-mailboxmanager-function/src/main/java/org/apache/james/mailboxmanager/torque/TorqueMailbox.java
URL: http://svn.apache.org/viewvc/james/server/trunk/torque-mailboxmanager-function/src/main/java/org/apache/james/mailboxmanager/torque/TorqueMailbox.java?rev=635301&r1=635300&r2=635301&view=diff
==============================================================================
--- james/server/trunk/torque-mailboxmanager-function/src/main/java/org/apache/james/mailboxmanager/torque/TorqueMailbox.java
(original)
+++ james/server/trunk/torque-mailboxmanager-function/src/main/java/org/apache/james/mailboxmanager/torque/TorqueMailbox.java
Sun Mar  9 10:25:10 2008
@@ -623,12 +623,12 @@
                 
                 final List rows = MessageRowPeer.doSelectJoinMessageFlags(new Criteria());
                 final List filteredMessages = new ArrayList();
-                for (Iterator it = filteredMessages.iterator(); it
+                for (Iterator it = rows.iterator(); it
                         .hasNext();) {
                     final MessageRow row = (MessageRow) it.next();
                     try {
                         if (searches.isMatch(query, row)) {
-                            rows.add(row);
+                            filteredMessages.add(row);
                         }
                     } catch (TorqueException e) {
                         getLog().info("Cannot test message against search criteria. Will
continue to test other messages.", e);



---------------------------------------------------------------------
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