this change confuses me. I guess m_maxMessageSizeBytes holds KBs and bodySize holds Bytes? should I change the var name to m_maxMessageSizeKB then so I can get my mind straight again? ;-)

[EMAIL PROTECTED] wrote:
Author: bago
Date: Mon May 15 16:59:53 2006
New Revision: 406781

URL: http://svn.apache.org/viewcvs?rev=406781&view=rev
Log:
Converted SMTPServerTest to use commons-net SMTPClient instead of ristretto 
SMTPProtocol (part of JAMES-498)
Added two tests, fixed a bug in the size check of the mock MailServer.

Modified: 
james/server/trunk/src/test/org/apache/james/test/mock/james/MockMailServer.java
URL: 
http://svn.apache.org/viewcvs/james/server/trunk/src/test/org/apache/james/test/mock/james/MockMailServer.java?rev=406781&r1=406780&r2=406781&view=diff
==============================================================================
--- 
james/server/trunk/src/test/org/apache/james/test/mock/james/MockMailServer.java
 (original)
+++ 
james/server/trunk/src/test/org/apache/james/test/mock/james/MockMailServer.java
 Mon May 15 16:59:53 2006
@@ -59,7 +59,7 @@
     public void sendMail(Mail mail) throws MessagingException {
         int bodySize = mail.getMessage().getSize();
         try {
-            if (m_maxMessageSizeBytes != 0 && m_maxMessageSizeBytes < 
bodySize) throw new MessageSizeException();
+            if (m_maxMessageSizeBytes != 0 && m_maxMessageSizeBytes*1024 < 
bodySize) throw new MessageSizeException();
         } catch (MessageSizeException e) {
             throw new MessagingException("message size exception is nested", 
e);
         }



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to